post the code from combatassistant (for the spear's spec)
|
Hey.
I have PI base, And on my server you can't noclip even with following. But when someone uses a drqagon spear spec on a oponoointe it will push that player 1 space back, Bassicly they can noclip. This is getting very abused i dont even know where to start on how to fix it. Please if you are going to help me fix it ( Spoon feed )
post the code from combatassistant (for the spear's spec)
case 1249:
c.startAnimation(405);
c.gfx100(253);
if (c.playerIndex > 0) {
Client o = (Client) PlayerHandler.players[i];
o.getPA().getSpeared(c.absX, c.absY);
}
break;public boolean checkSpecAmount(int weapon) {
switch (weapon) {
case 1249:
(i searched the ID in combatassisntant
get me this method in playerassistantCode:getSpeared
thats the getspearded method in playerassispublic void getSpeared(int otherX, int otherY) {
int x = c.absX - otherX;
int y = c.absY - otherY;
if (x > 0)
x = 1;
else if (x < 0)
x = -1;
if (y > 0)
y = 1;
else if (y < 0)
y = -1;
moveCheck(x, y);
c.lastSpear = System.currentTimeMillis();
}
make it check for clipping withing the else if this is what i have for the clipping check idk yoursthis would be if you want to make y +1Code:Region.getClipping(c.getX(), c.getY() + 1, c.heightLevel, 0, 1)
idk how your clipping system is handled but you have to check if theres no object/wall/... before making him push so befre y or x changes
public void getSpeared(int otherX, int otherY) {
int x = c.absX - otherX;
int y = c.absY - otherY;
if (x > 0)
x = 1;
else if (x < 0)
x = -1;
if (y > 0)
Region.getClipping(c.getX(), c.getY() + 1, c.heightLevel, 0, 1)
else if (y < 0)
y = -1;
moveCheck(x, y);
c.lastSpear = System.currentTimeMillis();
}
he means it like that^ ^
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |