View Single Post
Lt.RAT
Member
Join Date: Sep 2008
Location: Russia Yekaterinburg
Old 05-11-2010 , 16:20   Re: Orpheu: Engine PM Functions
Reply With Quote #22

Quote:
Originally Posted by joropito View Post
It would be nice to pass arguments as memory addresses at own risk
And not only arguments. For structs better to have fakemeta style (like in pev)
while getting struct member we provide string
Code:
maxspeed = Float:OrpheuGetParamStructMember( 1, "clientmaxspeed");
better to provide some predefined value (faster to lookup struct offset for it)
Code:
maxspeed = Float:OrpheuGetParamStructMember( 1, pmove_clientmaxspeed);
it speed-up module a bit, and i don`t see any problems coz all structs hardcoded atm.

I think that fakemeta should be faster than Orpheu in:
Code:
   set_uc(_:cmd, UC_ForwardMove, 0);
   OrpheuSetStructMember(cmd, "forwardmove", 0);
In some other cases, for example:
Code:
		maxspeed = Float:OrpheuGetParamStructMember( 1, "clientmaxspeed");
		if (maxspeed != 1.0)
		{
			fMaxSpeed[id] = maxspeed;
			OrpheuSetParamStructMember( 1, "clientmaxspeed", 1.0);
		}
better to load "maxspeed" as memory addresses, and then using it we can access several times with good speed (with compare to other methods). But it`s additional work, that could be used only in 2% of moments
Lt.RAT is offline
Send a message via ICQ to Lt.RAT