Quote:
Originally Posted by Natsheh
You can do this, get user velocity, strip backward velocity, then set his velocity.
|
You can have backwards velocity without using IN_BACK as well, I think the goal here is to block just IN_BACK.
I've been looking for a way to do this as well, and finally ended up with this:
PHP Code:
public fwdRG_PM_Move()
{
new ucmd = get_pmove(pm_cmd);
new Float:fwmove = get_ucmd(ucmd, ucmd_forwardmove);
if(fwmove < 0)
{
set_ucmd(ucmd, ucmd_forwardmove, 0.0);
//set_ucmd(ucmd, ucmd_buttons, get_ucmd(ucmd, ucmd_buttons) & ~IN_BACK);
}
}
Blocking movement this way is somewhat laggy for the client though, since it starts moving instantly and then gets reset after the command reaches the server.