player_stepmove() was not working right with the stepsleft value over 2.0f.

The speed value wasn't checked if it's higher then 1.0f only if stepsleft
is lover as the calculated speed value.
  if (speed > 1.0f) speed = 1.0f; is the solution
origin
stpohle 21 years ago
parent a738d9bc55
commit 6e774bdc18

@ -1,23 +1,28 @@
$Id: ChangeLog,v 1.86 2004/11/30 14:30:34 stpohle Exp $ $Id: ChangeLog,v 1.87 2004/11/30 23:07:58 stpohle Exp $
2004-11-28
- the firewall flag will be enabled and disabled automaticly.
- only players who are in the game will be able to send
gamedata related packets to the game. (do_pkg updated)
* delete the joingame packet from the resend thing..
server thinks we rejoin.. only on a slow client
* FINISH TEAM MODE. * FINISH TEAM MODE.
2004-10-18 * Server quits, will the AI player moved correctls to the
new Server?
- AI Player die on a slow computer because they move more
as 1 Field. This might be also the problem Acidjnk told
me about.
- fixed: Server starts the game soo fast that the - fixed: Server starts the game soo fast that the
client's ignore the gamestat for a running game. client's ignore the gamestat for a running game.
Check if all players are ready. Check if all players are ready.
- Makefile.am in include and data changed so make dist will
work fine as well as make install won't install anymore
all the useless *.h files.
- the firewall flag will be enabled and disabled automaticly.
Datapacket PKG_contest created to make it possible to work.
- only players who are in the game will be able to send
gamedata related packets to the game. (do_pkg() changed)
- fixed: AI won't have anymore so many suicide deaths. - fixed: AI won't have anymore so many suicide deaths.
- Variable dir_change added so we won't have - Variable dir_change added so we won't have
@ -27,8 +32,6 @@ $Id: ChangeLog,v 1.86 2004/11/30 14:30:34 stpohle Exp $
- New Team menu Handling. - New Team menu Handling.
2004-09-23
- little work on the AI, there are still some kind of - little work on the AI, there are still some kind of
problems. Maybe i'll rewrite the whole AI again. problems. Maybe i'll rewrite the whole AI again.
@ -40,14 +43,10 @@ $Id: ChangeLog,v 1.86 2004/11/30 14:30:34 stpohle Exp $
net_game_send_delplayer had a problem with the second net_game_send_delplayer had a problem with the second
local player. local player.
2004-09-13
- changed: Chat Mode will always keep active if there is - changed: Chat Mode will always keep active if there is
only one player on one computer. If there are two player only one player on one computer. If there are two player
we have to press F5 to activate the chatwindow. we have to press F5 to activate the chatwindow.
2004-09-12
- fixed: Quit Game wasn't working from the in game menu - fixed: Quit Game wasn't working from the in game menu
- fixed: Network Version Error. There is no - fixed: Network Version Error. There is no
@ -55,8 +54,6 @@ $Id: ChangeLog,v 1.86 2004/11/30 14:30:34 stpohle Exp $
- fixed: Single Player Menu there was no ESC key working - fixed: Single Player Menu there was no ESC key working
2004-09-11
- fixed: Player Selection Screen (single player) - fixed: Player Selection Screen (single player)
ESC key wasn't working and also closing the program ESC key wasn't working and also closing the program
haven't worked. haven't worked.

@ -1,4 +1,4 @@
/* $Id: player.c,v 1.93 2004/11/30 14:30:37 stpohle Exp $ /* $Id: player.c,v 1.94 2004/11/30 23:08:08 stpohle Exp $
* player.c - everything what have to do with the player */ * player.c - everything what have to do with the player */
#include <SDL.h> #include <SDL.h>
@ -324,8 +324,10 @@ stepmove_player (int pl_nr)
else else
speed = 1.0f - _pos.y; speed = 1.0f - _pos.y;
if (speed > (p->stepsleft) || speed == 0) if (speed > (p->stepsleft) || speed == 0.0f)
speed = p->stepsleft; speed = p->stepsleft;
if (speed > 1.0f)
speed = 1.0f;
// check the new field position // check the new field position
d.x = d.y = 0.0f; d.x = d.y = 0.0f;

Loading…
Cancel
Save