The Ur-Quan Masters Home Page Welcome, Guest. Please login or register.
Did you miss your activation email?
December 10, 2024, 12:15:36 am
Home Help Search Login Register
News: Celebrating 30 years of Star Control 2 - The Ur-Quan Masters

+  The Ur-Quan Masters Discussion Forum
|-+  The Ur-Quan Masters Re-Release
| |-+  General UQM Discussion (Moderator: Death 999)
| | |-+  Yehat Shielding
« previous next »
Pages: [1] Print
Author Topic: Yehat Shielding  (Read 1544 times)
jaychant
*Smell* controller
****
Offline Offline

Gender: Male
Posts: 432


Please visit my homepage


View Profile WWW
Yehat Shielding
« on: February 06, 2009, 04:12:27 am »

In my little mod, I tried to get rid of the incompetent shielding that happens with the Yehat by increasing SPECIAL_WAIT from 2 to 10 (which is the life of the shield). What happened was not at all what I expected. To make this short, how does SPECIAL_WAIT affect the way the shield works? Also, how could I eliminate the incompetent shielding that happens? (What lines?)

EDIT: I peeked at the source and found, in yehat.c, this code (lines 219-252):
Code:
static void
yehat_postprocess (PELEMENT ElementPtr)
{
if (!(ElementPtr->state_flags & NONSOLID))
{
STARSHIPPTR StarShipPtr;

GetElementStarShip (ElementPtr, &StarShipPtr);
/* take care of shield effect */
if (StarShipPtr->special_counter > 0)
{
if (ElementPtr->life_span == NORMAL_LIFE)
StarShipPtr->special_counter = 0;
else
{
#ifdef OLD
SetPrimColor (
&(GLOBAL (DisplayArray))[ElementPtr->PrimIndex],
BUILD_COLOR (MAKE_RGB15 (0x1F, 0x1F, 0x1F), 0x0F)
);
SetPrimType (
&(GLOBAL (DisplayArray))[ElementPtr->PrimIndex],
STAMPFILL_PRIM
);
#endif /* OLD */

ProcessSound (SetAbsSoundIndex (
/* YEHAT_SHIELD_ON */
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 1), ElementPtr);
DeltaEnergy (ElementPtr, -SPECIAL_ENERGY_COST);
}
}

#ifdef OLD

I assume this is the shield activation and such, but I can't tell where it puts the shield up again if the special key is pressed. Of course it also might not be there.
« Last Edit: February 07, 2009, 01:57:40 pm by jaychant » Logged

Please visit my homepage.
Pages: [1] Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!