Reset movable entities origin on round start
As said in the title, I need to reset all the moveable entities' origin on round start(including func_train, etc. everything that can have its origin changed.).
Please help. Thanks in advance. |
Re: Reset movable entities origin on round start
|
Re: Reset movable entities origin on round start
Quote:
some escape maps get bugged |
Re: Reset movable entities origin on round start
The code is really simple, you could look for yourself if it works for func_train and func_tracktrain aswell. Just replace func_pushable with the desired entity classes. You can also copy-paste the while loop to perform the search with multiple entities, you just need to set iEnt = 0 in front of each while block.
|
Re: Reset movable entities origin on round start
You can also try looping through all desired entities and calling ExecuteHam(Ham_CS_Restart, entity);
|
Re: Reset movable entities origin on round start
What if you hook entity spawn and then push all entities ( their index only ) into array and then loop the array in round start instead of that?
function i would use: [php] public pfn_keyvalue(ent) { static classname[32], key[32], value[32] copy_keyvalue(classname, 31, key, 31, value, 31) } [php] Is it true if i would say that its only called when server starts or loads map? ( nope, cant test it. I dont have counter strike right now! ) I dont remember seeing it calling when server was already running. I might be wrong tho. |
| All times are GMT -4. The time now is 21:13. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.