Oil patch correct removed/set from David Slimp. No death sound for oil patch or removed units.

This commit is contained in:
johns 2000-05-21 15:49:29 +00:00
parent 4ade3de8c9
commit f9a54f86ae
2 changed files with 11 additions and 13 deletions

View file

@ -493,6 +493,7 @@
<LI>Building of walls only in network game allowed.
<LI>Fixed bug: cancel gives back more than the unit/upgrade has cost.
<LI>Network code finished, most bugs found, works now with firewalls.
<LI>Fixed bug: Placement and removement of oil patch from David Slimp.
<LI>+++
</UL>

View file

@ -603,17 +603,13 @@ global void UnitLost(const Unit* unit)
}
//
// Destroy oil-platform, must update oil.
// Destroy oil-platform, must re-make oil patch.
//
if( type->GivesOil ) {
temp=OilPatchOnMap(unit->X,unit->Y);
if( temp ) {
// JOHNS: copy remaining oil value
temp->Value=unit->Value;
temp->Removed=0;
} else {
DebugLevel0(__FUNCTION__": Update no oil-patch %s\n",type->Ident);
}
if( type->GivesOil && unit->Value > 0 ) {
// NOTE: I wasn't sure the best UnitType/Player
// NOTE: This should really NOT be hardcoded?!
temp=MakeUnitAndPlace(unit->X,unit->Y,UnitTypeByWcNum(93),&Players[15]);
temp->Value=unit->Value;
}
player->UnitTypesCount[type->Type]--;
@ -2350,11 +2346,10 @@ global void DestroyUnit(Unit* unit)
unit->HP=0;
unit->Moving=0;
type=unit->Type;
PlayUnitSound(unit,VoiceDying);
MustRedraw|=RedrawResources; // for food usage indicator
type=unit->Type;
//
// Oil patch or removed units, just remove.
//
@ -2365,6 +2360,8 @@ global void DestroyUnit(Unit* unit)
return;
}
PlayUnitSound(unit,VoiceDying);
//
// Catapults,... explodes.
//