// NOTE THIS BUG: hardcoded: we currently only spawn npcs and players automatically.
return;
}
// send spawn agent packet
P021_SpawnAgent spawnAgent = new P021_SpawnAgent();
spawnAgent.init(channel);
spawnAgent.setAgentID(agentIDs.agentID);
spawnAgent.setFacColorLocalID((faction.factionColor << 24) | agentIDs.localID); // is this the localid?
spawnAgent.setUnknown1((byte) 1);
spawnAgent.setUnknown2((byte) 9);//5);
spawnAgent.setPositionVector(pos);
spawnAgent.setPositionPlane(pos.getZPlane());
spawnAgent.setDirectionRotation(new Vector2(Float.POSITIVE_INFINITY, rotation));
spawnAgent.setUnknown3((short)1);
spawnAgent.setMoveSpeed(move.speed);
spawnAgent.setUnknown4(1F);//Float.POSITIVE_INFINITY);
spawnAgent.setUnknown5(0x41400000);
spawnAgent.setSpawnType(faction.spawnType.getIntString()); // "play" backwards
spawnAgent.setUnknown11(new Vector2(Float.POSITIVE_INFINITY, Float.POSITIVE_INFINITY));
spawnAgent.setUnknown12(new Vector2(Float.POSITIVE_INFINITY, Float.POSITIVE_INFINITY));
spawnAgent.setUnknown15(new Vector2(Float.POSITIVE_INFINITY, Float.POSITIVE_INFINITY));
channel.writeAndFlush(spawnAgent);
}