02.08.2017, 17:05
Quote:
Add somewhere in there trace, and print out values "BallStep" and "BallStep - n". One of those is 20 and your suspects are BallDown[BallStep - n] and ZBallPos[BallStep]. Check the size of arrays ZBallPos and BallDown - the one with 16 slots is your culprit.
|
Код HTML:
public OnObjectMoved(objectid) { if (objectid == Ball) { new Float: x, Float: y, Float: z; GetObjectPos(objectid, x,y,z); new n = END_BALL_STEP; if (BallStep >= n) { new b; if (!Mode) b = 8; else b = 10; if (BallStep == n + b) { BallPos[0] = x; BallPos[1] = y; BallPos[2] = z; CanJump[BallOn] = 0; ApplyAnimation(BallOn, "BSKTBALL", "BBALL_Jump_Shot_O", 4, 0, 0, 0, 1, 100); BallOn = -1; } else { if (!Mode) { GameTextForPlayer(BallOn, "~g~+1", 3000, 6); new Float: a = BallDown[BallStep - n]; MoveObject(objectid, x,y,z + a, 8-a); BallStep++; } else { new Float: a = BallSide[BallStep - n]; MoveObject(objectid, x+0.15*Mode, y - 0.08, z + a, 8-a); BallStep++; } } } MoveObject(objectid, x+BallSteps[0], y+BallSteps[1], z+ZBallPos[BallStep], 7.65); BallStep++; }