1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 07:13:58 -05:00

Fix Game Interface / AC Callbacks + support for T5ZM, T6MP and T6ZM for the Game Interface. (#288)

* Fix trying to write to a struct before its initialized.

Same issue on IW4, IW5 and T5 game modules.

* Fix path issues in the scripts + add support for t5zm.

* Fix deploy.bat
* Change paths inside the gsc scripts used to call functions in other scripts
* Remove mp includes from base gsc file.
#include maps\mp\_utility;
#include maps\mp\gametypes\_hud_util;
* Define GetXuid as overrideMethod as t5zm doesn't have it.
* Define GetPlayerFromClientNum as getting all players is slightly different on t5zm.

* Remove the precompiled gsc file for T6 as PlutoT6 can load uncompiled GSC now.

* Fix _customcallbacks.gsc for T6

* Add T6 support to the game interface.

* Update _integration_base.gsc

use camelCase for functionName

* Make sure the Setup functions are always called in the right order.

Base -> shared -> game
Otherwise we might write to structs before they are created.

* Move functions interacting with the game from _base to _shared

GetPlayerFromClientNum
OnPlayerJoinedTeam
OnPlayerJoinedSpectators
GenerateJoinTeamString
PlayerTrackingOnInterval
SaveTrackingMetrics

* Block execution until game specific setup is done

Block _shared execution until the game specific file finished.
This allows the game specific file to override the events in _shared.

* Fix setup event flow

Move check of sv_iw4madmin_integration_enabled dvar after waittill in _shared so _base has a chance to set it to 1.
Move check of sv_iw4madmin_autobalance dvar to OnPlayerConnect in _shared so the game specific script has a chance to set the dvar.

* ignore bots

* add more spaces
This commit is contained in:
xerxes-at
2023-05-29 03:15:52 +02:00
committed by GitHub
parent f0542fa69f
commit d0e39b240a
12 changed files with 1446 additions and 458 deletions

View File

@ -385,7 +385,7 @@ const commands = [{
required: true
}
],
supportedGames: ['IW4', 'IW5', 'T5'],
supportedGames: ['IW4', 'IW5', 'T5', 'T6'],
execute: (gameEvent) => {
if (!validateEnabled(gameEvent.owner, gameEvent.origin)) {
return;
@ -405,7 +405,7 @@ const commands = [{
name: 'player',
required: true
}],
supportedGames: ['IW4', 'IW5', 'T5'],
supportedGames: ['IW4', 'IW5', 'T5', 'T6'],
execute: (gameEvent) => {
if (!validateEnabled(gameEvent.owner, gameEvent.origin)) {
return;
@ -423,7 +423,7 @@ const commands = [{
name: 'player',
required: true
}],
supportedGames: ['IW4', 'IW5', 'T5'],
supportedGames: ['IW4', 'IW5', 'T5', 'T6'],
execute: (gameEvent) => {
if (!validateEnabled(gameEvent.owner, gameEvent.origin)) {
return;
@ -441,7 +441,7 @@ const commands = [{
name: 'player',
required: true
}],
supportedGames: ['IW4', 'IW5', 'T5'],
supportedGames: ['IW4', 'IW5', 'T5', 'T6'],
execute: (gameEvent) => {
if (!validateEnabled(gameEvent.owner, gameEvent.origin)) {
return;
@ -471,7 +471,7 @@ const commands = [{
permission: 'SeniorAdmin',
targetRequired: false,
arguments: [],
supportedGames: ['IW4', 'IW5', 'T5'],
supportedGames: ['IW4', 'IW5', 'T5', 'T6'],
execute: (gameEvent) => {
if (!validateEnabled(gameEvent.owner, gameEvent.origin)) {
return;
@ -494,7 +494,7 @@ const commands = [{
required: true
}
],
supportedGames: ['IW4', 'IW5', 'T5'],
supportedGames: ['IW4', 'IW5', 'T5', 'T6'],
execute: (gameEvent) => {
if (!validateEnabled(gameEvent.owner, gameEvent.origin)) {
return;
@ -515,7 +515,7 @@ const commands = [{
name: 'player',
required: true
}],
supportedGames: ['IW4', 'IW5', 'T5'],
supportedGames: ['IW4', 'IW5', 'T5', 'T6'],
execute: (gameEvent) => {
if (!validateEnabled(gameEvent.owner, gameEvent.origin)) {
return;
@ -533,7 +533,7 @@ const commands = [{
name: 'player',
required: true
}],
supportedGames: ['IW4', 'IW5', 'T5'],
supportedGames: ['IW4', 'IW5', 'T5', 'T6'],
execute: (gameEvent) => {
if (!validateEnabled(gameEvent.owner, gameEvent.origin)) {
return;
@ -560,7 +560,7 @@ const commands = [{
required: true
}
],
supportedGames: ['IW4', 'IW5', 'T5'],
supportedGames: ['IW4', 'IW5', 'T5', 'T6'],
execute: (gameEvent) => {
if (!validateEnabled(gameEvent.owner, gameEvent.origin)) {
return;
@ -584,7 +584,7 @@ const commands = [{
name: 'player',
required: true
}],
supportedGames: ['IW4', 'IW5', 'T5'],
supportedGames: ['IW4', 'IW5', 'T5', 'T6'],
execute: (gameEvent) => {
if (!validateEnabled(gameEvent.owner, gameEvent.origin)) {
return;
@ -602,7 +602,7 @@ const commands = [{
name: 'player',
required: true
}],
supportedGames: ['IW4', 'IW5', 'T5'],
supportedGames: ['IW4', 'IW5', 'T5', 'T6'],
execute: (gameEvent) => {
if (!validateEnabled(gameEvent.owner, gameEvent.origin)) {
return;