#include "Flatline.h" #include "Flatline_Hooks.h" #include "Flatline_Server.h" //Don't modify this. char * 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 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 ); } int FLrHook_DebugNameTextureInit(short width, short height, int type, int allocated, int flags, char* name, void** output) { //flags = (1 << 10); type = 1; //DDrPatch_Byte( 0x005EB83C + 3, 0xff ); DDrPatch_Int32( 0x005EB83C, 0xFF000000 ); return M3rTextureMap_New(width, height, type, allocated, flags, name, output); } short FLrHook_DebugNameShadeHack( Character* Char ) { return TSrContext_SetShade(*(void**)0x005EB844, ONrCharacter_GetHealthShade( Char->Health, Char->MaxHealth )); //return TSrContext_SetShade(*(void**)0x005EB844, 0xFFFFFFFF); } /* 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 FLrHook_Lasers( Character* Char ) { ONiDrawWeaponSight( Char ); AI2rDisplayDebuggingInfo( Char ); }