More Efficient Way in Removing Entities
Hi. I wanted to ask which objective entities' removing method is better?
Fakemeta's or Ham's? Fakemeta: Code:
Code:
Also I wonder if I'm disabling Ham's forwards right. |
Re: More Efficient Way in Removing Entities
Try to only alter classnames and not remove ents.
In a no-objectives plugin, i was renaming "func_bomb_target" to "_func_bomb_target", and same for other objectives entities. To set objectives back i only had to set again the right classname (and restart the round). If you really want to remove them, why are you using forwards ? why don't you only remove all of them at map start ? |
Re: More Efficient Way in Removing Entities
Well connor he unregisters forward at plugin_init
|
Re: More Efficient Way in Removing Entities
Quote:
Can you provide the non-Engine-module way of removing those objectives? |
Re: More Efficient Way in Removing Entities
Quote:
anyway, "static s_szClassName[32] -> newszClassName[32]". you should not use a static there cuz it will still exist after FM_Spawn is run. edit: you were faster... fakemeta engfunc( EngFunc_RemoveEntity, ent ); i guess youll have to do this in FM_Spawn or FM_KeyValue, at least spawns which are created after are not registered to the cs engine (changing an existing spawn, for example a ter spawn to ct spawn works!). maybe you can even use FMRES_SUPERCEDE. |
Re: More Efficient Way in Removing Entities
Quote:
If you want it to be constant, you can do this: PHP Code:
|
Re: More Efficient Way in Removing Entities
Bump.
I need the best way to get rid of entities and then create another one ("info_bomb_target"). It doesn't matter it's FM, Eng or Ham as long as it's the most efficient one. |
Re: More Efficient Way in Removing Entities
Code:
Code:
I don't know where i got these codes but i've been using them. :wink: |
Re: More Efficient Way in Removing Entities
So are you saying that these codes are the best possible ones?
|
| All times are GMT -4. The time now is 23:37. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.