diff options
| author | Michal Zima <xhire@mujmalysvet.cz> | 2010-06-07 20:35:00 +0200 |
|---|---|---|
| committer | Michal Zima <xhire@mujmalysvet.cz> | 2010-06-07 20:35:00 +0200 |
| commit | e6b473b7522c331cb8d2c62e8a2d05e0840800db (patch) | |
| tree | 6d911ca4559dd43f8ea2c377a836e0e3b03f1c49 /src/screen/world.c | |
| parent | 0cb72c814fa839268ed7a09d59d82aa1514a8155 (diff) | |
[BUGFIX] Player uses other gun than he expects
Diffstat (limited to 'src/screen/world.c')
| -rw-r--r-- | src/screen/world.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/screen/world.c b/src/screen/world.c index b1043a1..3d3214b 100644 --- a/src/screen/world.c +++ b/src/screen/world.c @@ -243,12 +243,16 @@ static void control_keyboard(tux_t *tux, control_t *control) switch (control_get_key_action(control)) { case CONTROL_SHOT: - netAction(tux, TUX_SHOT); - tux_action(tux, TUX_SHOT); + if (tux->isCanShot == TRUE) { + netAction(tux, TUX_SHOT); + tux_action(tux, TUX_SHOT); + } break; case CONTROL_SWITCH: - netAction(tux, TUX_SWITCH_GUN); - tux_action(tux, TUX_SWITCH_GUN); + if (tux->isCanSwitchGun == TRUE) { + netAction(tux, TUX_SWITCH_GUN); + tux_action(tux, TUX_SWITCH_GUN); + } break; } } |