Raised This Month: $ Target: $400
 0% 

Reset movable entities origin on round start


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 06-22-2014 , 13:29   Reset movable entities origin on round start
Reply With Quote #1

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.
__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
GuskiS
Veteran Member
Join Date: Aug 2007
Location: Latvia
Old 06-22-2014 , 14:35   Re: Reset movable entities origin on round start
Reply With Quote #2

https://forums.alliedmods.net/showth...16291?p=616291
MPNumB is da man for fixes <3
__________________
Finished mods:
Trouble in Terrorist Town
MurderMod
The Hidden
Cowboys vs Indians
JailBreak Supreme
Survival Madness
GuskiS is offline
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 08-08-2014 , 07:11   Re: Reset movable entities origin on round start
Reply With Quote #3

Quote:
Originally Posted by GuskiS View Post
thank you. could the same be done for func_train or func_tracktrain?
some escape maps get bugged
__________________

Last edited by georgik57; 08-08-2014 at 07:11.
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
Nextra
Veteran Member
Join Date: Apr 2008
Location: Germany
Old 08-08-2014 , 10:15   Re: Reset movable entities origin on round start
Reply With Quote #4

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.
__________________
In Flames we trust!
Nextra is offline
NiHiLaNTh
Way Past Expiration
Join Date: May 2009
Location: Latvia
Old 08-08-2014 , 13:18   Re: Reset movable entities origin on round start
Reply With Quote #5

You can also try looping through all desired entities and calling ExecuteHam(Ham_CS_Restart, entity);
__________________


Last edited by NiHiLaNTh; 08-08-2014 at 13:18.
NiHiLaNTh is offline
Send a message via Skype™ to NiHiLaNTh
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 08-09-2014 , 20:40   Re: Reset movable entities origin on round start
Reply With Quote #6

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.
.Dare Devil. is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:13.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode