Fixing AI in multiplayer
Jump to navigation
Jump to search

This page is actively undergoing a major edit.
As a courtesy, please do not edit this while this message is displayed.
If this page has not been edited for at least several hours to a few days, please remove this template. This message is intended to help reduce edit conflicts; please remove it between editing sessions to allow others to edit the page.
As a courtesy, please do not edit this while this message is displayed.
If this page has not been edited for at least several hours to a few days, please remove this template. This message is intended to help reduce edit conflicts; please remove it between editing sessions to allow others to edit the page.
The person who added this notice will be listed in its edit history should you wish to contact them.
This is an update article about how to fix NPCs in multiplayer. HL2 has no support for NPCs in multiplayer and HL2DM has certainly broken more of the AI.
Relationships
There are no relationships set in HL2DM. This is simpel to fix. Go to hl2_gamerules.cpp
and copy the entire InitDefaultAIRelationships
function. Past it in hl2mp_gamerules.cpp
and add a call to the new function in the constructor of the HL2DM gamerules.
Weapons
The weapons have custom activities and animation events in HL2DM. In the HL2DM-versions of the weapons, this is removed.
Open the weapon_hl2mpbase.h file and add the following code after the includes:
#ifndef CLIENT_DLL #include "AI_BaseNPC.h" #endif