Here it is at last! The pushto code that used to be used for things like moving spiderman this is taken from the python version:
Code:
def pushto(userid, coord, force):
if isinstance(coord, str):
coord = coord.split(',')
if hasattr(coord, '__iter__'):
if not isinstance(coord, Vector):
coord = Vector(coord)
if str(userid).startswith('#'):
userid = getUseridList(userid)
elif not hasattr(userid, '__iter__'):
userid = (userid, )
for user in userid:
if es.exists('userid', user):
loca = Vector(es.getplayerlocation(user))
coord -= loca
coord = coord * float(force)
es.setplayerprop(user, 'CBasePlayer.localdata.m_vecBaseVelocity', str(coord))
Here is our code for comparison:
Code:
new ult_level = War3_GetSkillLevel( client, thisRaceID, ULT_WEB );
new Float:startpos[3];
new Float:endpos[3];
new Float:localvector[3];
new Float:velocity[3];
GetClientAbsOrigin( client, startpos );
War3_GetAimEndPoint( client, endpos );
if(enemyImmunityNotInRange(client, endpos))
{
localvector[0] = endpos[0] - startpos[0];
localvector[1] = endpos[1] - startpos[1];
localvector[2] = endpos[2] - startpos[2];
velocity[0] = localvector[0] * PushForce[ult_level];
velocity[1] = localvector[1] * PushForce[ult_level];
velocity[2] = localvector[2] * PushForce[ult_level];
SetEntDataVector( client, m_vecBaseVelocity, velocity, true );
TE_SetupBeamPoints( startpos, endpos, BeamSprite, BeamSprite, 0, 0, 1.0, 1.0, 1.0, 0, 0.0, { 200, 200, 200, 255 }, 0 );
TE_SendToAll();
}
else
{
W3MsgEnemyHasImmunity(client);
}
You will notice that the code is exactly the same however I have a theory. The theory is that we actually need to multiply all forces by .25 to do the OB conversion. This is why spiderman and the others seem so much more powerful. As you see what we are doing here is EXACTLY the same as how long jump works exact that we also change the Z axis data. So if after the OB update we need to mult the pre ob force values by .25 then logically we need to do this for all force values that ever modify m_vecBaseVelocity. Races will be updated to take into account these changes.