Fixed Mmrnmhrm's X-Form transformation without energy use; bug #1004

git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@3166 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
avolkov
2009-07-01 20:31:49 +00:00
parent 77bbf0e540
commit bd092ca844
2 changed files with 4 additions and 7 deletions
+1
View File
@@ -1,4 +1,5 @@
Changes towards version 0.7: Changes towards version 0.7:
- Fixed Mmrnmhrm's X-Form transformation without energy use (bug #1004) - Alex
- Added missing sleeps in DoInput() functions (bug #893) - Alex - Added missing sleeps in DoInput() functions (bug #893) - Alex
- Starmap unit conversion corrections; fixes bug #970 - Alex - Starmap unit conversion corrections; fixes bug #970 - Alex
- Rounding-error correction in log(x|y)ToUniverse (bug #1046), from Nic - Rounding-error correction in log(x|y)ToUniverse (bug #1046), from Nic
+3 -7
View File
@@ -369,8 +369,6 @@ mmrnmhrm_postprocess (ELEMENT *ElementPtr)
ProcessSound (SetAbsSoundIndex ( ProcessSound (SetAbsSoundIndex (
/* TRANSFORM */ /* TRANSFORM */
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 1), ElementPtr); StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 1), ElementPtr);
DeltaEnergy (ElementPtr,
-StarShipPtr->RaceDescPtr->characteristics.special_energy_cost);
StarShipPtr->weapon_counter = 0; StarShipPtr->weapon_counter = 0;
@@ -434,11 +432,9 @@ mmrnmhrm_preprocess (ELEMENT *ElementPtr)
if ((StarShipPtr->cur_status_flags & SPECIAL) if ((StarShipPtr->cur_status_flags & SPECIAL)
&& StarShipPtr->special_counter == 0) && StarShipPtr->special_counter == 0)
{ {
if (StarShipPtr->RaceDescPtr->ship_info.energy_level < /* Either we transform or text will flash */
StarShipPtr->RaceDescPtr->characteristics.special_energy_cost) if (DeltaEnergy (ElementPtr,
DeltaEnergy (ElementPtr, -StarShipPtr->RaceDescPtr->characteristics.special_energy_cost))
-StarShipPtr->RaceDescPtr->characteristics.special_energy_cost); /* so text will flash */
else
{ {
if (ElementPtr->next.image.farray == StarShipPtr->RaceDescPtr->ship_data.ship) if (ElementPtr->next.image.farray == StarShipPtr->RaceDescPtr->ship_data.ship)
ElementPtr->next.image.farray = ElementPtr->next.image.farray =