#include "Flatline.h" #include "Flatline_Hooks.h" #include "Flatline_Server.h" //Don't modify this. char* ONICALL FLrHook_DoorOpen( DoorObject *Door, Character *Char) { int crashStop; int Args[2] = {Door->Door.ID, 0}; if(server_started) { if(Char) { Args[1] = Char->Number; } else { Args[1] = -1; } } crashStop = !server_started || FLsPublic_Event(EV_DOOR_OPEN, Args); return (char*)(Door->Door.class); } short ONICALL FLrHook_ConsoleActivate( void *inObject, Character *inCharacter ) { if(server_started) { int Args[2] = {*((char*)inObject + 0x2C), inCharacter->Number}; FLsPublic_Event(EV_CONSOLE_USE, Args); } return OBJrConsole_OnActivate( inObject, inCharacter ); } /* void FLrHook_Lasers( Character* PlayerChar ) { if(server_started || client_connected) { int i; for(i = 0; i < MAX_PLAYERS; i++) { if(PlayerList[i] && PlayerList[i]->Chr && PlayerList[i]->Chr->Inventory.Weapons[0]) { ONiDrawWeaponSight( PlayerList[i]->Chr ); } } } else { if( ONiDrawWeaponSight( ONgGameState->PlayerCharacter ); } } */ void ONICALL FLrHook_Lasers( Character* Char ) { ONiDrawWeaponSight( Char ); AI2rDisplayDebuggingInfo( Char ); }