New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Game Interface / AC Callbacks + support for T5ZM, T6MP and T6ZM for the Game Interface. #288
Changes from 5 commits
ab94649
6562088
44e6438
5328456
ca53fe2
96fb2ae
617117c
f4eb259
b5482c7
a1af766
89a6f86
833abdd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
#include common_scripts\utility; | ||
#include maps\mp\_utility; | ||
#include maps\mp\gametypes\_hud_util; | ||
|
||
Init() | ||
{ | ||
|
@@ -22,6 +20,8 @@ Setup() | |
level.commonFunctions = spawnstruct(); | ||
level.commonFunctions.setDvar = "SetDvarIfUninitialized"; | ||
level.commonFunctions.isBot = "IsBot"; | ||
level.commonFunctions.getXuid = "GetXuid"; | ||
level.commonFunctions.GetPlayerFromClientNum = "GetPlayerFromClientNum"; | ||
|
||
level.commonKeys = spawnstruct(); | ||
|
||
|
@@ -51,6 +51,7 @@ Setup() | |
level.clientCommandRusAsTarget = []; | ||
level.logger = spawnstruct(); | ||
level.overrideMethods = []; | ||
level.overrideMethods["GetPlayerFromClientNum"] = ::GetPlayerFromClientNum; | ||
|
||
level.iw4madminIntegrationDebug = GetDvarInt( "sv_iw4madmin_integration_debug" ); | ||
InitializeLogger(); | ||
|
@@ -360,7 +361,7 @@ GenerateJoinTeamString( isSpectator ) | |
} | ||
} | ||
|
||
guid = self GetXuid(); | ||
guid = self [[level.overrideMethods[level.commonFunctions.getXuid]]](); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So after thinking about this, I think we should move the That should put the above registration of the overrideMethods more in line with what's already done in the shared gsc |
||
|
||
if ( guid == "0" ) | ||
{ | ||
|
@@ -565,8 +566,8 @@ NotifyClientEventTimeout( eventType ) | |
|
||
NotifyClientEvent( eventInfo ) | ||
{ | ||
origin = getPlayerFromClientNum( int( eventInfo[3] ) ); | ||
target = getPlayerFromClientNum( int( eventInfo[4] ) ); | ||
origin = [[level.overrideMethods[level.commonFunctions.GetPlayerFromClientNum]]]( int( eventInfo[3] ) ); | ||
target = [[level.overrideMethods[level.commonFunctions.GetPlayerFromClientNum]]]( int( eventInfo[4] ) ); | ||
|
||
event = spawnstruct(); | ||
event.type = eventInfo[1]; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,8 +2,6 @@ | |
|
||
Init() | ||
{ | ||
level.eventBus.gamename = "IW4"; | ||
|
||
thread Setup(); | ||
} | ||
|
||
|
@@ -13,12 +11,14 @@ Setup() | |
|
||
// it's possible that the notify type has not been defined yet so we have to hard code it | ||
level waittill( "IntegrationBootstrapInitialized" ); | ||
level.eventBus.gamename = "IW4"; | ||
|
||
scripts\_integration_base::RegisterLogger( ::Log2Console ); | ||
|
||
level.overrideMethods["GetTotalShotsFired"] = ::GetTotalShotsFired; | ||
level.overrideMethods[level.commonFunctions.setDvar] = ::_SetDvarIfUninitialized; | ||
level.overrideMethods[level.commonFunctions.isBot] = ::IsTestClient; | ||
level.overrideMethods[level.commonFunctions.getXuid] = ::_GetXUID; | ||
level.overrideMethods["waittill_notify_or_timeout"] = ::_waittill_notify_or_timeout; | ||
level.overrideMethods[level.commonFunctions.changeTeam] = ::ChangeTeam; | ||
level.overrideMethods[level.commonFunctions.getTeamCounts] = ::CountPlayers; | ||
|
@@ -199,6 +199,11 @@ Log2Console( logLevel, message ) | |
PrintConsole( "[" + logLevel + "] " + message + "\n" ); | ||
} | ||
|
||
_GetXUID() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No this is wrong. See how |
||
{ | ||
return self GetXUID(); | ||
} | ||
|
||
////////////////////////////////// | ||
// GUID helpers | ||
///////////////////////////////// | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: use camelCase for functionName
level.commonFunctions.getPlayerFromClientNum