Space Marines die if on board a self-destructing Scout, from Nic

(fixes bug #445)


git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1324 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
mcmartin
2004-02-19 07:51:14 +00:00
parent 8fe1920a51
commit 4fecf6381c
3 changed files with 11 additions and 3 deletions
+1
View File
@@ -1,4 +1,5 @@
Changes towards version 0.4: Changes towards version 0.4:
- Space marines die in a self-destructing Scout (Bug #445), from Nic
- Added the -l option to produce logfiles (bug #560), from Nic - Added the -l option to produce logfiles (bug #560), from Nic
- Zoq-Fot-Pik speech properly vertically centered (bug #579), from Nic - Zoq-Fot-Pik speech properly vertically centered (bug #579), from Nic
- Input code refactoring, phase 2: All player input is brokered by - Input code refactoring, phase 2: All player input is brokered by
+2 -2
View File
@@ -349,7 +349,7 @@ static void marine_preprocess (PELEMENT ElementPtr);
#define MARINE_WAIT 12 #define MARINE_WAIT 12
static void void
intruder_preprocess (PELEMENT ElementPtr) intruder_preprocess (PELEMENT ElementPtr)
{ {
HELEMENT hElement, hNextElement; HELEMENT hElement, hNextElement;
@@ -706,7 +706,7 @@ PELEMENT ElementPtr;
} }
} }
static void void
marine_collision (PELEMENT ElementPtr0, PPOINT pPt0, PELEMENT ElementPtr1, PPOINT pPt1) marine_collision (PELEMENT ElementPtr0, PPOINT pPt0, PELEMENT ElementPtr1, PPOINT pPt1)
{ {
if (ElementPtr0->life_span if (ElementPtr0->life_span
+8 -1
View File
@@ -203,6 +203,13 @@ destruct_preprocess (PELEMENT ElementPtr)
} }
} }
/* In order to detect any Orz Marines that have boarded the ship
when it self-destructs, we'll need to see these Orz functions */
void intruder_preprocess (PELEMENT);
void marine_collision (PELEMENT, PPOINT, PELEMENT, PPOINT);
#define ORZ_MARINE(ptr) (ptr->preprocess_func == intruder_preprocess && \
ptr->collision_func == marine_collision)
static void static void
self_destruct (PELEMENT ElementPtr) self_destruct (PELEMENT ElementPtr)
{ {
@@ -250,7 +257,7 @@ self_destruct (PELEMENT ElementPtr)
LockElement (hElement, &ObjPtr); LockElement (hElement, &ObjPtr);
hNextElement = GetSuccElement (ObjPtr); hNextElement = GetSuccElement (ObjPtr);
if (CollidingElement (ObjPtr)) if (CollidingElement (ObjPtr) || ORZ_MARINE (ObjPtr))
{ {
#define DESTRUCT_RANGE 180 #define DESTRUCT_RANGE 180
SIZE delta_x, delta_y; SIZE delta_x, delta_y;