switch to player bullet state
This commit is contained in:
@@ -78,7 +78,7 @@ void Client::drawPlayer(player_t *player) {
|
||||
glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, player->team->color);
|
||||
glMatrixMode( GL_MODELVIEW);
|
||||
glPushMatrix();
|
||||
glTranslated(player->x, player->y, player->z);
|
||||
glMultMatrixf(player->m);
|
||||
glEnableClientState( GL_VERTEX_ARRAY);
|
||||
glEnableClientState( GL_TEXTURE_COORD_ARRAY);
|
||||
glEnableClientState( GL_NORMAL_ARRAY);
|
||||
@@ -328,7 +328,7 @@ void Client::accelerate(double x, double y, double z) {
|
||||
m << msg;
|
||||
network.send(m);
|
||||
}
|
||||
|
||||
#if 0
|
||||
void Client::drop_bomb(double rx, double ry, double rz, double ttl) {
|
||||
bomb_drop_meesage_t msg;
|
||||
msg.x = game.local_player->x + rx * 20;
|
||||
@@ -342,7 +342,7 @@ void Client::drop_bomb(double rx, double ry, double rz, double ttl) {
|
||||
m << msg;
|
||||
network.send(m);
|
||||
}
|
||||
|
||||
#endif
|
||||
void Client::loadConsoleFont() {
|
||||
GLuint font_id = 0;
|
||||
|
||||
@@ -453,23 +453,25 @@ void Client::update() {
|
||||
} else if (glfwGetKey('D')) {
|
||||
accelerate(-rz * v, 0, rx * v);
|
||||
}
|
||||
|
||||
#if 0
|
||||
if (glfwGetKey(GLFW_KEY_SPACE)) {
|
||||
accelerate(game.local_player->vx * -0.1, game.local_player->vy
|
||||
* -0.1, game.local_player->vz * -0.1);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#if 0
|
||||
if (glfwGetKey(GLFW_KEY_LCTRL)) {
|
||||
if (time - last_bomb > 1.0) {
|
||||
last_bomb = time;
|
||||
drop_bomb(rx, ry, rz, 5.0);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
if (game.local_player) {
|
||||
camX = game.local_player->x;
|
||||
camY = game.local_player->y;
|
||||
camZ = game.local_player->z;
|
||||
camX = game.local_player->m[12];
|
||||
camY = game.local_player->m[13];
|
||||
camZ = game.local_player->m[14];
|
||||
} else {
|
||||
camX = 1000.0;
|
||||
camY = 1000.0;
|
||||
|
Reference in New Issue
Block a user