Hello, I am having an issue with this entity based animation system. I'm pretty new to this. This Source uses a flag system. Here's the issue when I try to do any kind of animation nothing happens, it has nothing to do with the client because i've used other sources on it and they worked perfect. I will rep++ here are snippet of code, please ask if you require anything else. I've literally spent five + hours trying to fix this and I can't. I've tried everything.... this is the game with my GFX command. I'm hoping someone has already encountered this issue when they tried using an entity based animation system. Thanks guys!
http://www.rune-server.org/runescape...wing-more.html
Server\src\org\rs2\network\packets\impl\Commands.j ava
Code:
} else if (playerCommand.startsWith("anim")) {
String[] args = playerCommand.split(" ");
c.startAnimation(Integer.parseInt(args[1]));
PlayerAssistant.requestUpdates(c);
}
Server\src\org\rs2\entity\player\Player.java
Code:
/**
*Animations
**/
public void startAnimation(int animId) {
//if (wearing2h() && animId == 829)
//return;
if((isDead() || playerLevel[3] <= 0) && animId != 0x900) {
return;
}
animationRequest = animId;
animationWaitCycles = 0;
updateRequired = true;
}
public void startAnimation(int animId, int time) {
animationRequest = animId;
animationWaitCycles = time;
updateRequired = true;
}
public void appendAnimationRequest(Stream str) {
synchronized(this) {
str.writeWordBigEndian((animationRequest==-1) ? 65535 : animationRequest);
str.writeByteC(animationWaitCycles);
}
}
Server\src\org\rs2\entity\player\PlayerAssistant.j ava
Code:
/**
* Request updates
*/
public static void requestUpdates(Player p) {
p.updateRequired = true;
p.getUpdateFlag().flag(Flag.APPEARANCE);
}
Side note, I just can't understand how this even calls the animation. Please explain it to me, what i see is information just getting set to variables how does any kind of function get called to tell the character to do a animation.
public void startAnimation(int animId) {
//if (wearing2h() && animId == 829)
//return;
if((isDead() || playerLevel[3] <= 0) && animId != 0x900) {
return;
}
animationRequest = animId;
animationWaitCycles = 0;
updateRequired = true;
}