-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #130 from Die4Ever/develop v1.5.5 Beta
v1.5.5 Beta
- Loading branch information
Showing
25 changed files
with
649 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
class DeusExMover injects DeusExMover; | ||
|
||
function TakeDamage(int Damage, Pawn instigatedBy, Vector hitlocation, Vector momentum, name damageType) | ||
{ | ||
if (bDestroyed) | ||
return; | ||
|
||
if ((damageType == 'TearGas') || (damageType == 'PoisonGas') || (damageType == 'HalonGas')) | ||
return; | ||
|
||
if ((damageType == 'Stunned') || (damageType == 'Radiation')) | ||
return; | ||
|
||
if ((DamageType == 'EMP') || (DamageType == 'NanoVirus') || (DamageType == 'Shocked')) | ||
return; | ||
|
||
if (bBreakable) | ||
{ | ||
// add up the damage | ||
if (Damage >= minDamageThreshold) | ||
doorStrength -= CalcDamage(Damage, damageType); | ||
// else | ||
// doorStrength -= Damage * 0.001; // damage below the threshold does 1/10th the damage | ||
|
||
doorStrength = FClamp(doorStrength, 0.0, 1.0); | ||
if (doorStrength ~= 0.0) | ||
BlowItUp(instigatedBy); | ||
} | ||
} | ||
|
||
function float CalcDamage(float Damage, name damageType) | ||
{ | ||
if (Damage < minDamageThreshold) return 0; | ||
|
||
if ((damageType == 'TearGas') || (damageType == 'PoisonGas') || (damageType == 'HalonGas')) | ||
return 0; | ||
|
||
if ((damageType == 'Stunned') || (damageType == 'Radiation')) | ||
return 0; | ||
|
||
if ((DamageType == 'EMP') || (DamageType == 'NanoVirus') || (DamageType == 'Shocked')) | ||
return 0; | ||
|
||
switch(ExplodeSound1) { | ||
case Sound'DeusExSounds.Generic.GlassBreakLarge': | ||
return Damage * 0.01; | ||
case Sound'DeusExSounds.Generic.GlassBreakSmall': | ||
return Damage * 0.01; | ||
case Sound'DeusExSounds.Generic.WoodBreakSmall': | ||
return Damage * 0.005; | ||
case Sound'DeusExSounds.Generic.SmallExplosion1': | ||
return Damage * 0.002; | ||
default: | ||
//log("WARNING: "$self$": CalcDamage unknown ExplodeSound1: "$ExplodeSound1); | ||
return Damage * 0.002; | ||
} | ||
return Damage * 0.002; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
class MissionEndgame injects MissionEndgame; | ||
|
||
function PostPostBeginPlay() | ||
{ | ||
savedSoundVolume = SoundVolume; | ||
Super.PostPostBeginPlay(); | ||
} | ||
|
||
// ---------------------------------------------------------------------- | ||
// InitStateMachine() | ||
// ---------------------------------------------------------------------- | ||
|
||
function InitStateMachine() | ||
{ | ||
Super(MissionScript).InitStateMachine(); | ||
|
||
// Destroy all flags! | ||
//if (flags != None) | ||
// flags.DeleteAllFlags(); | ||
|
||
// Set the PlayerTraveling flag (always want it set for | ||
// the intro and endgames) | ||
flags.SetBool('PlayerTraveling', True, True, 0); | ||
} | ||
|
||
// ---------------------------------------------------------------------- | ||
// FirstFrame() | ||
// | ||
// Stuff to check at first frame | ||
// ---------------------------------------------------------------------- | ||
|
||
function FirstFrame() | ||
{ | ||
Super(MissionScript).FirstFrame(); | ||
|
||
endgameTimer = 0.0; | ||
|
||
if (Player != None) | ||
{ | ||
// Make sure all the flags are deleted. | ||
//DeusExRootWindow(Player.rootWindow).ResetFlags(); | ||
|
||
// Start the conversation | ||
if (localURL == "ENDGAME1") | ||
Player.StartConversationByName('Endgame1', Player, False, True); | ||
else if (localURL == "ENDGAME2") | ||
Player.StartConversationByName('Endgame2', Player, False, True); | ||
else if (localURL == "ENDGAME3") | ||
Player.StartConversationByName('Endgame3', Player, False, True); | ||
|
||
// turn down the sound so we can hear the speech | ||
savedSoundVolume = SoundVolume; | ||
SoundVolume = 32; | ||
Player.SetInstantSoundVolume(SoundVolume); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.