From a739db67867ce99ade728122c310a72d1418b0ab Mon Sep 17 00:00:00 2001 From: meep-eep Date: Tue, 15 Jun 2004 22:59:55 +0000 Subject: [PATCH] Resource units given more obviously when ordering a probe to self-destruct (bug #586), from Nic. git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1385 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/ChangeLog | 2 ++ sc2/src/sc2code/battle.c | 9 +++++++++ sc2/src/sc2code/comm/slyland/slyland.c | 12 +++--------- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/sc2/ChangeLog b/sc2/ChangeLog index ba161a3cc..26fb99b14 100644 --- a/sc2/ChangeLog +++ b/sc2/ChangeLog @@ -1,4 +1,6 @@ Changes towards version 0.4: +- Resource units given more obviously when ordering a probe to + self-destruct (bug #586), from Nic. - Shipyard "Combat Energy" changed to reflect the recharge rate (bug #522). Also, some cleanups. Thanks and apologies to Nic. - Added lots of debugging functions, SvdB diff --git a/sc2/src/sc2code/battle.c b/sc2/src/sc2code/battle.c index d294cbae2..34a253057 100644 --- a/sc2/src/sc2code/battle.c +++ b/sc2/src/sc2code/battle.c @@ -22,6 +22,7 @@ QUEUE disp_q; SIZE battle_counter; +BOOLEAN instantVictory; static void ProcessInput (void) @@ -232,6 +233,14 @@ Battle (void) BattleSong (FALSE); num_ships = InitShips (); + + if (instantVictory) + { + num_ships = 0; // no ships were harmed in the making of this battle + battle_counter = 1; // a winner is you! + instantVictory = FALSE; + } + if (num_ships) { BATTLE_STATE bs; diff --git a/sc2/src/sc2code/comm/slyland/slyland.c b/sc2/src/sc2code/comm/slyland/slyland.c index 7147e6f15..9efde3282 100644 --- a/sc2/src/sc2code/comm/slyland/slyland.c +++ b/sc2/src/sc2code/comm/slyland/slyland.c @@ -201,17 +201,11 @@ CombatIsInevitable (RESPONSE_REF R) } else if (PLAYER_SAID (R, destruct_code)) { - COUNT race_bounty[] = - { - RACE_SHIP_COST - }; + extern BOOLEAN instantVictory; NPCPhrase (DESTRUCT_SEQUENCE); - - LockMutex (GraphicsLock); - DeltaSISGauges (0, 0, race_bounty[SLYLANDRO_SHIP] >> 3); - UnlockMutex (GraphicsLock); - SET_GAME_STATE (BATTLE_SEGUE, 0); + instantVictory = TRUE; + SET_GAME_STATE (BATTLE_SEGUE, 1); } else {