Skip to content

Commit

Permalink
2024-12-17 updated (v8.5.9)
Browse files Browse the repository at this point in the history
see Changelogs\Roto-AZMod v8.5.9.md
  • Loading branch information
fbef0102 committed Dec 16, 2024
1 parent 7c45d80 commit 9a309a8
Show file tree
Hide file tree
Showing 31 changed files with 1,031 additions and 234 deletions.
22 changes: 22 additions & 0 deletions Changelogs/Roto-AZMod v8.5.9.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
v8.5.9

* Fix l4dtoolz, Please re-download latest "Windows Server files" or "Linux Server files"

## Delete
None

## New
* l4d_unreservelobby.smx: Removes lobby reservation when server is full, allow 9+ players to join server

## Update
* l4d_consistent_escaperoute
* Enhanced_Throwables
* rotoblin-az.smx
* cfg/server.cfg

## Change
* Now player can connect server from lobby
* Server now has lobby reservation when first player joins the server, and removes lobby reservation once server is full



4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Rotoblin-AZMod
v8.5.8
v8.5.9
<br/>Developer @ 2017-2024 [Harry](http://steamcommunity.com/profiles/76561198026784913)
<br/><img src="https://i.imgur.com/FGkLDMp.png">
- [Navigation](#rotoblin-azmod)
Expand Down Expand Up @@ -41,7 +41,7 @@ A Competitive L4D1 Versus Configuration. Based upon the L4D2 [Acemod V4 Release]
* Install "Roto-AZMod Main files", this contains the configs, plugins, gamedate, and other server settings.
* At this step, you already setup Server's base for configs, so you can finally start the server.
* Launch parameters:
* ```-console -game left4dead -tickrate 100 +log on +map l4d_vs_airport01_greenhouse +exec server +sv_lan 0```
* ```-console -game left4dead +log on +map l4d_vs_airport01_greenhouse +exec server +sv_lan 0 -tickrate 100 -maxplayers 31```

- - - -
### Server Install Optional ###
Expand Down
178 changes: 168 additions & 10 deletions SourceCode/scripting-az/include/left4dhooks.inc
Original file line number Diff line number Diff line change
Expand Up @@ -60,18 +60,18 @@



// Natives: 273 (including 3 for L4D1 only)
// Natives: 274 (including 3 for L4D1 only)
// L4D1 = 31 [left4downtown] + 47 [l4d_direct] + 16 [l4d2addresses] + 73 [silvers - mine!] + 4 [anim] = 172
// L4D2 = 61 [left4downtown] + 59 [l4d_direct] + 31 [l4d2addresses] + 117 [silvers - mine!] + 4 [anim] = 272
// L4D2 = 61 [left4downtown] + 59 [l4d_direct] + 31 [l4d2addresses] + 118 [silvers - mine!] + 4 [anim] = 273
// Methods and Natives by "Forgetest": 53 [PlayerAnimState] + 22 [Ammo_t] + 15 [AmmoDef] = 90

// Forwards: 221 (including 5 for L4D1 only)
// L4D1 = 147
// L4D2 = 216
// Forwards: 224 (including 5 for L4D1 only)
// L4D1 = 149
// L4D2 = 219

// Stocks: 169 (L4D1 = 114, L4D2 = 167)
// left4dhooks_silver 46 stocks (L4D1 = 39, L4D2 = 53)
// left4dhooks_stocks 84 stocks (L4D1 = 45, L4D2 = 80)
// left4dhooks_stocks 86 stocks (L4D1 = 46, L4D2 = 81)
// left4dhooks_lux_library 34 stocks (L4D1 = 30, L4D2 = 34)


Expand Down Expand Up @@ -121,6 +121,7 @@ public void __pl_l4dh_SetNTVOptional()
MarkNativeAsOptional("L4D2_SetFirstSpawnClass");
MarkNativeAsOptional("L4D_FindRandomSpot");
MarkNativeAsOptional("L4D2_IsVisibleToPlayer");
MarkNativeAsOptional("L4D2_GetSpecialInfectedDominatingMe");
MarkNativeAsOptional("L4D_HasAnySurvivorLeftSafeArea");
MarkNativeAsOptional("L4D_IsAnySurvivorInStartArea");
MarkNativeAsOptional("L4D_IsAnySurvivorInCheckpoint");
Expand Down Expand Up @@ -389,6 +390,7 @@ public void __pl_l4dh_SetNTVOptional()
MarkNativeAsOptional("L4D_State_Transition");
MarkNativeAsOptional("L4D_RegisterForbiddenTarget");
MarkNativeAsOptional("L4D_UnRegisterForbiddenTarget");
MarkNativeAsOptional("L4D_IsEntitySaveable");
MarkNativeAsOptional("L4D2_CTerrorPlayer_OnHitByVomitJar");
MarkNativeAsOptional("L4D2_Infected_OnHitByVomitJar");
MarkNativeAsOptional("L4D2_CTerrorPlayer_Fling");
Expand Down Expand Up @@ -842,7 +844,7 @@ enum WeaponType
WEAPONTYPE_UNKNOWN
};

stock static const char g_sWeaponTypes[WeaponType][] =
stock const char g_sWeaponTypes[WeaponType][16] =
{
"pistol",
"smg",
Expand Down Expand Up @@ -1217,6 +1219,28 @@ methodmap AmmoDef



// ====================================================================================================
// STOCKS
// ====================================================================================================

/**
* @brief Returns a weapons classname from the WeaponType valu
* @remarks This is only to prevent SM 1.12 warnings about unused variables
*
* @param type WeaponType
* @return Classname string
* @error Invalid type index
*/
// L4D2 only
stock char[] L4D2_GetWeaponClassname(WeaponType type)
{
return g_sWeaponTypes[type];
}





// ====================================================================================================
// ANIMATION HOOK
// ====================================================================================================
Expand Down Expand Up @@ -1681,7 +1705,7 @@ forward void L4D_OnMaterializeFromGhost_PostHandled(int client);
/**
* @brief Called whenever CDirector::OnFinishIntro is invoked
* @remarks called when the intro cutscene has finished
* @remarks This is a post hook, it appears to be called before the "L4D_OnReleaseSurvivorPositions" forward.
* @remarks This is a post hook, it appears to be called before the "L4D_OnReleaseSurvivorPositions" forward
*
* @noreturn
*/
Expand Down Expand Up @@ -2457,6 +2481,16 @@ forward void L4D_OnDoAnimationEvent_PostHandled(int client, int event, int varia
// 2020 Left4DHooks update: Blocked on L4D1/L4D2 Linux to prevent crashes. Waiting for DHooks update to support object returns
forward Action L4D2_OnSendInRescueVehicle();

/**
* @brief Called whenever CDirector::CreateRescuableSurvivors is invoked
* @remarks Called when the director is attempting to find survivors to respawn in rescue closets
* @remarks The value for every client in the "players" array will be set to 0, change this value to 1 to prevent their ghost appearing in rescue closets
* @remarks This is called every frame, so don't add complicated expensive logic within here
*
* @return Plugin_Changed to modify who is allowed to spawn, Plugin_Continue otherwise
*/
forward Action L4D_OnCreateRescuableSurvivors(int players[MAXPLAYERS+1]);

/**
* @brief Called whenever CDirectorScriptedEventManager::ChangeFinaleStage is invoked
* @remarks Called when the director stage changes
Expand Down Expand Up @@ -3088,7 +3122,7 @@ forward Action L4D2_OnFindScavengeItem(int client, int &item);
*
* @return Plugin_Handled to block, Plugin_Changed to use overwritten values from plugin, Plugin_Continue otherwise
*/
// FOr a future update:
// For a future update:
// * @param targetScanFlags targeting flags (unknown)
// * @param ignoreTarget entity to ignore targeting
// forward Action L4D2_OnChooseVictim_Pre(int specialInfected, int &lastTarget, int &targetScanFlags, int &ignoreTarget); // For a future update
Expand Down Expand Up @@ -3350,6 +3384,21 @@ forward void L4D2_OnPummelVictim_Post(int attacker, int victim);
// L4D2 only
forward void L4D2_OnPummelVictim_PostHandled(int attacker, int victim);

/**
* @brief Called when CTerrorPlayer::IsDominatedBySpecialInfected() is invoked and returned true
* @remarks Call when a player is being dominated, called over multiple frames
* @remarks Dominators are: Hunter, Smoker, Jockey, and Charger
* @remarks This forward is called in frames, but instantly tells you when any domination happened. Recommend not to put too much logic in here
* @remarks For Chargers, this forward is called when being carried or being pummelled. Queue pummelling will not trigger this forward
*
* @param victim Client index of the victim
* @param dominator Client index of the dominator
*
* @noreturn
**/
// L4D2 Only
forward void L4D2_OnDominatedBySpecialInfected(int victim, int dominator);

/**
* @brief Called whenever CTerrorPlayer::OnVomitedUpon is invoked
* @remarks Called when a Survivor player is covered in Boomer bile, or when using "Bile the World" plugin by "AtomicStryker"
Expand Down Expand Up @@ -4161,6 +4210,91 @@ forward void L4D_OnGameModeChange(int gamemode);
*/
forward void L4D_OnServerHibernationUpdate(bool hibernating);

/**
* @brief Called whenever InfoChangelevel::SaveEntities() is invoked
* @brief Called when a map has been finished, and is about to save the entities in the saferoom
* @remarks Called before the event "map_transition"
* @remarks Won't be called if Director::AreHumanZombiesAllowed() returns true, which refers to the versus gamemode, or this entity name is "info_solo_changelevel"
*
* @param info_changelevel The entity index of "info_changelevel"
* @param Kv A KeyValue pointer Address. Null_Address will be returned if the pointer is null
*
* @return Plugin_Handled to prevent saving entities, Plugin_Continue otherwise
*/
// L4D1 only
forward Action L4D1_OnSavingEntities(int info_changelevel, Address Kv);

/**
* @brief Called whenever InfoChangelevel::SaveEntities() is invoked
* @brief Called when a map has been finished, and is about to save the entities in the saferoom (usually props or items brought into the saferoom.)
* @remarks Called before the event "map_transition"
* @remarks Won't be called if CTerrorGameRules::HasPlayerControlledZombies() returns true, which refers to the versus/scavenge related pvp gamemode
* @remarks This forward will not trigger if the relative pre-hook forward has been blocked with Plugin_Handled
*
* @param info_changelevel The entity index of "info_changelevel"
* @param Kv A KeyValue pointer Address. Null_Address will be returned if the pointer is null
*
* @noreturn
*/
// L4D1 only
forward void L4D1_OnSavingEntities_Post(int info_changelevel, Address Kv);

/**
* @brief Called whenever InfoChangelevel::SaveEntities() is invoked
* @brief Called when a map has been finished, and is about to save the entities in the saferoom
* @remarks Called before the event "map_transition"
* @remarks Won't be called if CTerrorGameRules::HasPlayerControlledZombies() returns true, which refers to the versus/scavenge related pvp gamemode
* @remarks This forward will ONLY trigger if the relative pre-hook forward has been blocked with Plugin_Handled
*
* @param info_changelevel The entity index of "info_changelevel"
* @param Kv A KeyValue pointer Address. Null_Address will be returned if the pointer is null
*
* @noreturn
*/
// L4D1 only
forward void L4D1_OnSavingEntities_PostHandled(int info_changelevel, Address Kv);

/**
* @brief Called whenever InfoChangelevel::SaveEntities() is invoked
* @brief Called when a map has been finished, and is about to save the entities in the saferoom (usually props or items brought into the saferoom.)
* @remarks Called before the event "map_transition"
* @remarks Won't be called if CTerrorGameRules::HasPlayerControlledZombies() returns true, which refers to the versus/scavenge related pvp gamemode
*
* @param info_changelevel The entity index of "info_changelevel"
*
* @return Plugin_Handled to prevent saving entities, Plugin_Continue otherwise
*/
// L4D2 only
forward Action L4D2_OnSavingEntities(int info_changelevel);

/**
* @brief Called whenever InfoChangelevel::SaveEntities() is invoked
* @brief Called when a map has been finished, and the game has finished saving the entities in the saferoom
* @remarks Called before the event "map_transition"
* @remarks Won't be called if CTerrorGameRules::HasPlayerControlledZombies() returns true, which refers to the versus/scavenge related pvp gamemode
* @remarks This forward will not trigger if the relative pre-hook forward has been blocked with Plugin_Handled
*
* @param info_changelevel The entity index of "info_changelevel"
*
* @noreturn
*/
// L4D2 only
forward void L4D2_OnSavingEntities_Post(int info_changelevel);

/**
* @brief Called whenever InfoChangelevel::SaveEntities() is invoked
* @brief Called when a map has been finished, and the game has finished saving the entities in the saferoom
* @remarks Called before the event "map_transition"
* @remarks Won't be called if CTerrorGameRules::HasPlayerControlledZombies() returns true, which refers to the versus/scavenge related pvp gamemode
* @remarks This forward will ONLY trigger if the relative pre-hook forward has been blocked with Plugin_Handled
*
* @param info_changelevel The entity index of "info_changelevel"
*
* @noreturn
*/
// L4D2 only
forward void L4D2_OnSavingEntities_PostHandled(int info_changelevel);

/**
* @brief Called when the client's material system is expecting instructions from the server in regards to addons
* @remarks Doesn't fire if l4d2_addons_eclipse is -1 or 0
Expand Down Expand Up @@ -4601,6 +4735,18 @@ native void L4D_FindRandomSpot(int NavArea, float vecPos[3]);
*/
native bool L4D2_IsVisibleToPlayer(int client, int team, int team_target, int NavArea, float vecPos[3]);

/**
* @brief Given a victim client index, returns the client index of the Special Infected that is dominating the victim
* @remarks Returns -1 if victim index is invalid, or not a survivor, or not being dominated by a Special Infected
* @remarks You can see this native as the SDKCall version of L4D2_GetInfectedAttacker()
*
* @param victim The client index of the victim to check
*
* @return The client index of the Special Infected that is dominating the victim
*/
// L4D2 Only
native int L4D2_GetSpecialInfectedDominatingMe(int victim)

/**
* @brief Teleports a player to a valid position if they are stuck
*
Expand Down Expand Up @@ -7369,4 +7515,16 @@ native int L4D_RegisterForbiddenTarget(int entity);
*
* @return Some memory address (large value) or possibly ID if already registered (low value from 1+)
*/
native void L4D_UnRegisterForbiddenTarget(int entity);
native void L4D_UnRegisterForbiddenTarget(int entity);

/**
* @brief To see if an entity is saveable to be transitioned to next map
* @remarks Calls InfoChangelevel::IsSaveableEntity. Entities that are saveable follow the rules below:
* @remarks 1. Entity is not a player, and its root hierarchical parent entity is not a player either
* @remarks 2. Entity has a capability flag "FCAP_ACROSS_TRANSITION", or the entity has no flag "EFL_DORMANT"
*
* @param entity Entity to check, usaully a prop, should not be a brush, etc
*
* @return True if entity is saveable, false otherwise
*/
native void L4D_IsEntitySaveable(int entity);
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,7 @@ stock void TE_SetupPhysicsProp(float vecModelOrigin[3],
TE_WriteNum("r", RGB[0]);
TE_WriteNum("g", RGB[1]);
TE_WriteNum("b", RGB[2]);
if( iSkin ) iSkin += 1; // Fix "symbol is never used" in SM 1.12
}

/**
Expand Down
Loading

0 comments on commit 9a309a8

Please sign in to comment.