Search found 1076 matches

by Ayuto
Thu Jul 19, 2018 8:09 pm
Forum: Plugin Development Support
Topic: How do I use engine_trace.enumerate_entities_in_box
Replies: 4
Views: 54

Re: How do I use engine_trace.enumerate_entities_in_box

You need to subclass EntityEnumerator. enum_entity is getting called for every found entity.
by Ayuto
Fri Jul 13, 2018 9:24 pm
Forum: Plugin Development Support
Topic: take_damage triggers player_death twice
Replies: 2
Views: 60

Re: take_damage triggers player_death twice

IIRC, you just need to check whether the player's health is already less or equal 0. If it is, don't apply the damage.
by Ayuto
Thu Jul 05, 2018 7:47 pm
Forum: Development Status Updates
Topic: Development status update (June 2018)
Replies: 0
Views: 53

Development status update (June 2018)

It's time for another development status update! :smile: ⋅ Fixes: ⋅ Additions: ⋅  Added class info for IServerGameDLL::LevelInit. ⋅ Removals: ⋅ Changes: ⋅  Updated get_public_ip() to make a call to http://api.ipify.org instead of http://ip....
by Ayuto
Sun Jun 24, 2018 8:55 am
Forum: Plugin Development Support
Topic: reloading custom package
Replies: 5
Views: 230

Re: reloading custom package

Like quartata mentioned reloading works fine: import testlib import importlib importlib.reload(testlib) The caching is done by Python itself via a dictionary (sys.modules). If you delete the module and use the above code, you will get an error like this: [SP] Caught an Exception: Traceback (...
by Ayuto
Sat Jun 23, 2018 6:48 am
Forum: Plugin Development Support
Topic: reloading custom package
Replies: 5
Views: 230

Re: reloading custom package

Yes, it should work. Can you show us your test code?
by Ayuto
Fri Jun 22, 2018 6:00 pm
Forum: Plugin Development Support
Topic: Is it possible to control the spectate camera?
Replies: 11
Views: 270

Re: Is it possible to control the spectate camera?

I have thought about my planned changes a little bit and decided to not add them. Use this to create the event: from events.manager import game_event_manager def create_hltv_fixed_event(pos, target, fov, offset, theta, phi): event = game_event_manager.create_event('hltv_fixed', T...
by Ayuto
Fri Jun 22, 2018 6:17 am
Forum: Plugin Development Support
Topic: Is it possible to control the spectate camera?
Replies: 11
Views: 270

Re: Is it possible to control the spectate camera?

get_object_pointer() doesn't work, because the CustomEvent class doesn't implement the _ptr() method.
Also, if that method is implemented, you don't need to get the pointer on your own. SP does that under the rug.

I will make some changes today, so you can get the underlying event.
by Ayuto
Wed Jun 20, 2018 8:38 pm
Forum: Plugin Requests
Topic: [Hldms] Entity remover, to remove "doubles"
Replies: 5
Views: 208

Re: [Hldms] Entity remover, to remove "doubles"

I guess the hl2dm build will also work for hldms. Just in case anyone needs it or wants to elaborate it a little bit more, here is "Stripper Lite". :grin: # ============================================================================= # >> IMPORTS # ========================================...
by Ayuto
Thu Jun 14, 2018 6:10 am
Forum: Plugin Requests
Topic: [Hldms] Entity remover, to remove "doubles"
Replies: 5
Views: 208

Re: [Hldms] Entity remover, to remove "doubles"

No need to use the emulator. EventScripts and Source.Python can be run at the same time on Windows.
by Ayuto
Sun Jun 03, 2018 11:09 am
Forum: Development Status Updates
Topic: Development status update (May 2018)
Replies: 0
Views: 105

Development status update (May 2018)

It's time for another development status update! :smile: ⋅ Fixes: ⋅  Fixed issue #248. ⋅ Additions: ⋅  Added magic methods to _CvarManager to return the ConVar value as the right type. ⋅  Added "reliable" attribute to RecipientFilter. &sdot...
by Ayuto
Tue May 29, 2018 4:14 pm
Forum: Plugin Development Support
Topic: parent entity behaviour effects changed
Replies: 10
Views: 320

Re: parent entity behaviour effects changed

Thanks for verifying! I have changed it back to the KeyValue method:
https://github.com/Source-Python-Dev-Te ... 7a0b5c549d
by Ayuto
Tue May 29, 2018 3:48 pm
Forum: Plugin Development Support
Topic: parent entity behaviour effects changed
Replies: 10
Views: 320

Re: parent entity behaviour effects changed

Did entity.get_key_value_vector('origin') fix your issue?
by Ayuto
Mon May 28, 2018 4:06 pm
Forum: Plugin Development Support
Topic: parent entity behaviour effects changed
Replies: 10
Views: 320

Re: parent entity behaviour effects changed

There was a change to SP related to the origin property in this PR: https://github.com/Source-Python-Dev-Team/Source.Python/pull/235 Previously, we retrieved the origin from the KeyValue origin , which called this function (it's the function VinciT mentioned): https://github.com/alliedmodders/hl2sdk...
by Ayuto
Sun May 27, 2018 11:10 am
Forum: Module/Package Submissions
Topic: Threaded MySQL
Replies: 18
Views: 3477

Re: Threaded MySQL

SQLAlchemy doesn't prevent lags. It's just a wrapper/abstraction for multiple database systems. It might run well, because your queries are executed quite fast.
by Ayuto
Thu May 24, 2018 5:06 am
Forum: Plugin Development Support
Topic: Unexpected behavior from pickle.dump
Replies: 8
Views: 256

Re: Unexpected behavior from pickle.dump

It could also be a missing super().__init__() call.
by Ayuto
Wed May 23, 2018 6:19 pm
Forum: Plugin Development Support
Topic: GetDataTableProxyFn?
Replies: 9
Views: 284

Re: GetDataTableProxyFn?

Thank you too! I didn't know about that way before. :smile:
by Ayuto
Wed May 23, 2018 5:48 am
Forum: Plugin Development Support
Topic: GetDataTableProxyFn?
Replies: 9
Views: 284

Re: GetDataTableProxyFn?

Sorry, now it's working: https://github.com/Source-Python-Dev-Team/Source.Python/commit/a832762de7df44653c03ef60e2063389460d4eaa from entities.entity import BaseEntity gamerules_proxy = BaseEntity.find("cs_gamerules") gamerules = None for prop in gamerules_proxy.server_class.table:...
by Ayuto
Tue May 22, 2018 10:00 pm
Forum: Plugin Development Support
Topic: GetDataTableProxyFn?
Replies: 9
Views: 284

Re: GetDataTableProxyFn?

by Ayuto
Tue May 22, 2018 7:41 pm
Forum: Plugin Development Support
Topic: GetDataTableProxyFn?
Replies: 9
Views: 284

Re: GetDataTableProxyFn?

The next version will contain GetDataTableProxyFn:
https://github.com/Source-Python-Dev-Te ... e50ab23a1d
by Ayuto
Sun May 20, 2018 6:18 am
Forum: Plugin Development Support
Topic: SP's update changes
Replies: 8
Views: 235

Re: SP's update changes

No, there is no issue. Everything works as intended. Even in C++ it would lead to an error when compiling your code if you pass a Vector instance to a function that requires a QAngle instance. You would need to type cast the Vector instance to QAngle before doing that.

Go to advanced search