Fixed bug : Load Game from replay doesn't allow me to command units

This commit is contained in:
jsalmon3 2003-02-10 18:23:04 +00:00
parent 225f11a69a
commit 0c9fc9ee0a
6 changed files with 19 additions and 15 deletions

View file

@ -1053,12 +1053,14 @@
should not display (from Russell Smith).
<LI>Added auto spell casting for healing, bloodlust, slow, haste,
invisibility, unholy armor, and exorcism (from Jimmy Salmon).
<LI>Fixed Bug #678581: Dragons, Gryphon, Mage, Deathknight death animation
(from Russell Smith)
<LI>Fixed Bug #676724: Buildings Not Updated Until seen in viewport
(from Russell Smith)
<LI>Fixed Bug #438896: Platform destroyed in fog of war (from Russell
Smith)
<LI>Fixed bug #678581: Dragons, Gryphon, Mage, Deathknight death animation
(from Russell Smith).
<LI>Fixed bug #676724: Buildings Not Updated Until seen in viewport
(from Russell Smith).
<LI>Fixed bug #438896: Platform destroyed in fog of war (from Russell
Smith).
<LI>Fixed bug #683770: Load Game from replay doesn't allow me to
command units (from Jimmy Salmon).
<LI>+++
</UL>
</UL>

View file

@ -10,7 +10,7 @@
//
/**@name loadgame.c - Load game. */
//
// (c) Copyright 2001,2002 by Lutz Sammer, Andreas Arens
// (c) Copyright 2001-2003 by Lutz Sammer, Andreas Arens
//
// FreeCraft is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published
@ -75,6 +75,7 @@ global void CleanModules(void)
{
SCM var;
EndReplayLog();
CleanMessages();
CleanIcons();

View file

@ -429,10 +429,13 @@ global void EndReplayLog(void)
fclose(LogFile);
LogFile=NULL;
}
if( DisabledLog ) {
// FIXME: LoadGame disables the log since replays aren't saved in the
// FIXME: saved games yet. Always enable the log again for now even
// FIXME: though it ignores the -l command line option.
// if( DisabledLog ) {
CommandLogDisabled=0;
DisabledLog=0;
}
// }
if( DisabledShowTips ) {
ShowTips=1;
DisabledShowTips=0;

View file

@ -10,7 +10,7 @@
//
/**@name mainloop.c - The main game loop. */
//
// (c) Copyright 1998-2002 by Lutz Sammer
// (c) Copyright 1998-2003 by Lutz Sammer
//
// FreeCraft is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published
@ -786,7 +786,6 @@ global void GameMainLoop(void)
// Game over
//
NetworkQuit();
EndReplayLog();
if( GameResult==GameDefeat ) {
fprintf(stderr,"You have lost!\n");
SetStatusLine("You have lost!");

View file

@ -10,7 +10,7 @@
//
/**@name menus.c - The menu function code. */
//
// (c) Copyright 1999-2002 by Andreas Arens
// (c) Copyright 1999-2003 by Andreas Arens and Jimmy Salmon
//
// FreeCraft is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published

View file

@ -3627,8 +3627,7 @@ global void HitUnit(Unit* attacker,Unit* target,int damage)
attacker->Player->Score+=target->Type->Points;
if( type->Building ) {
attacker->Player->TotalRazings++;
}
else {
} else {
attacker->Player->TotalKills++;
}
#ifdef USE_HP_FOR_XP
@ -3641,7 +3640,7 @@ global void HitUnit(Unit* attacker,Unit* target,int damage)
LetUnitDie(target);
return;
}
target->HP-=damage; // UNSIGNED!
target->HP-=damage;
#ifdef USE_HP_FOR_XP
if( attacker ) {
attacker->XP+=damage;