Revision 201
renamed gunner
proj_func.c | ||
---|---|---|
50 | 50 |
hor_mov = key_presses.d_pressed - key_presses.a_pressed; |
51 | 51 |
} |
52 | 52 |
|
53 |
void update_movement(ent_t *p) {
|
|
53 |
void update_movement(gunner_t *p) {
|
|
54 | 54 |
static const int speed = 5; |
55 |
ent_set_pos(p, ent_get_x(p) + speed * hor_mov, ent_get_y(p) + speed * ver_mov);
|
|
55 |
gunner_set_pos(p, gunner_get_x(p) + speed * hor_mov, gunner_get_y(p) + speed * ver_mov);
|
|
56 | 56 |
} |
57 | 57 |
|
58 | 58 |
void update_scale(void) { |
... | ... | |
90 | 90 |
|
91 | 91 |
int32_t get_mouse_Y(void) { return mouse_y; } |
92 | 92 |
|
93 |
double get_mouse_angle(ent_t *p) {
|
|
94 |
return atan2(ent_get_y_screen(p) - mouse_y, mouse_x - ent_get_x_screen(p));
|
|
93 |
double get_mouse_angle(gunner_t *p) {
|
|
94 |
return atan2(gunner_get_y_screen(p) - mouse_y, mouse_x - gunner_get_x_screen(p));
|
|
95 | 95 |
} |
96 | 96 |
|
97 | 97 |
int get_hor_movement(void) { return hor_mov; } |
Also available in: Unified diff