aboutsummaryrefslogtreecommitdiff
path: root/Northstar.CustomServers/mod/scripts
diff options
context:
space:
mode:
authorx3Karma <juliuslimck@gmail.com>2022-05-30 19:47:54 +0800
committerGitHub <noreply@github.com>2022-05-30 13:47:54 +0200
commit1b696045a30272d8d1d766b76958564e436f2bab (patch)
treef926de8dfc7d29b18f4e0f033f9fc07713bb4169 /Northstar.CustomServers/mod/scripts
parent14b38ad5277317f66a1d0212d58c536f7da89b27 (diff)
downloadNorthstarMods-1b696045a30272d8d1d766b76958564e436f2bab.tar.gz
NorthstarMods-1b696045a30272d8d1d766b76958564e436f2bab.zip
Small fixes for gamemode_fd (#376)
Diffstat (limited to 'Northstar.CustomServers/mod/scripts')
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_fd.nut32
1 files changed, 23 insertions, 9 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_fd.nut b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_fd.nut
index 7bc180ed..9348f021 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_fd.nut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_fd.nut
@@ -182,16 +182,24 @@ void function OnNpcDeath( entity victim, entity attacker, var damageInfo )
default:
string netIndex = GetAiNetIdFromTargetName(victim.GetTargetName())
if(netIndex != "")
- SetGlobalNetInt(netIndex,GetGlobalNetInt(netIndex)-1)
+ SetGlobalNetInt(netIndex,GetGlobalNetInt(netIndex)-1)
+ else
+ {
+ if (victim.GetTargetName() == "Cloak Drone") // special case for cloak drone, someone in respawn fucked up here
+ SetGlobalNetInt( "FD_AICount_Drone_Cloak", GetGlobalNetInt("FD_AICount_Drone_Cloak")-1)
+ }
}
SetGlobalNetInt("FD_AICount_Current",GetGlobalNetInt("FD_AICount_Current")-1)
}
- if ( victim.GetOwner() == attacker || !attacker.IsPlayer() || attacker == victim )
+ if ( victim.GetOwner() == attacker || !attacker.IsPlayer() || attacker == victim || victim.GetBossPlayer() == attacker || victim.GetClassName() == "npc_turret_sentry" )
return
int playerScore = 0
int money = 0
+ int scriptDamageType = DamageInfo_GetCustomDamageType( damageInfo )
+ int damageSourceId = DamageInfo_GetDamageSourceIdentifier( damageInfo )
+
if ( victim.IsNPC() )
{
string eventName = FD_GetScoreEventName( victim.GetClassName() )
@@ -203,7 +211,7 @@ void function OnNpcDeath( entity victim, entity attacker, var damageInfo )
money = 5
break
case "npc_drone":
- case "npc_spectre": // not sure
+ case "npc_spectre":
money = 10
break
case "npc_stalker":
@@ -215,6 +223,8 @@ void function OnNpcDeath( entity victim, entity attacker, var damageInfo )
default:
money = 0 // titans seem to total up to 50 money undoomed health
}
+ foreach(player in GetPlayerArray())
+ Remote_CallFunction_NonReplay( player, "ServerCallback_OnTitanKilled", attacker.GetEncodedEHandle(), victim.GetEncodedEHandle(), scriptDamageType, damageSourceId )
}
if (money != 0)
AddMoneyToPlayer( attacker , money )
@@ -758,7 +768,7 @@ void function OnHarvesterDamaged(entity harvester, var damageInfo)
EmitSoundAtPosition(TEAM_UNASSIGNED,fd_harvester.harvester.GetOrigin(),"coop_generator_destroyed")
newHealth = 0
PlayFactionDialogueToTeam( "fd_baseDeath", TEAM_MILITIA )
- fd_harvester.rings.Destroy()
+ fd_harvester.rings.Anim_Stop()
}
harvester.SetHealth( newHealth )
file.havesterWasDamaged = true
@@ -981,6 +991,7 @@ void function HealthScaleByDifficulty( entity ent )
ent.SetMaxHealth( ent.GetMaxHealth() - 5000 )
else
ent.SetMaxHealth( ent.GetMaxHealth() - 2000 )
+ break
case eFDDifficultyLevel.NORMAL:
if ( ent.IsTitan() )
ent.SetMaxHealth( ent.GetMaxHealth() - 2500 )
@@ -995,8 +1006,12 @@ void function HealthScaleByDifficulty( entity ent )
case eFDDifficultyLevel.INSANE:
if ( ent.IsTitan() )
{
- ent.SetShieldHealthMax( 2500 ) // apparently they have 0, costs me some time debugging this ffs
- ent.SetShieldHealth( 2500 )
+ entity soul = ent.GetTitanSoul()
+ if (IsValid(soul))
+ {
+ soul.SetShieldHealthMax( 2500 ) // apparently they have 0, costs me some time debugging this ffs
+ soul.SetShieldHealth( 2500 )
+ }
}
break
@@ -1087,7 +1102,6 @@ void function LoadEntities()
}
-
bool function allPlayersReady()
{
foreach(entity player in GetPlayerArray())
@@ -1167,7 +1181,7 @@ string function GetTargetNameForID(int typeId)
case eFD_AITypeIDs.LEGION:
return "npc_titan_ogre_minigun"
case eFD_AITypeIDs.TITAN_ARC:
- return "npc_titan_arc"
+ return "empTitan"
case eFD_AITypeIDs.RONIN:
return "npc_titan_stryder_leadwall"
case eFD_AITypeIDs.TITAN_MORTAR:
@@ -1199,7 +1213,7 @@ string function GetTargetNameForID(int typeId)
case eFD_AITypeIDs.DRONE:
return "drone"
case eFD_AITypeIDs.DRONE_CLOAK:
- return "cloakedDrone"
+ return "Cloak Drone" // have to be like this for some reason in cl_gamemode_fd
default:
return "titan"
}