Skip to content

[Server] Remove checkMovement #4

Description

@MotoLegacy

The checkMovement function takes a significantly long time to execute, proven by FTE's SSQC profiler.

float(float dir) checkMovement =
{
makevectors(self.movement);
string a = vtos(self.movement);
float x, y;
tokenize(a);
x = stof(argv(0));
y = stof(argv(1));
switch(dir) {
case forward:
if (x > 0)
return 1;
break;
case backward:
if (x < 0)
return 1;
break;
case right:
if (y > 0)
return 1;
break;
case left:
if (y < 0)
return 1;
break;
case all_move:
if (x || y)
return 1;
break;
default:
return 0;
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions