source: Daodan/src/flatline/Flatline_Hooks.c@ 976

Last change on this file since 976 was 878, checked in by alloc, 11 years ago

Daodan: Flatline fix

File size: 1.2 KB
Line 
1#include "Flatline.h"
2#include "Flatline_Hooks.h"
3#include "Flatline_Server.h"
4
5//Don't modify this.
6char* ONICALL FLrHook_DoorOpen( DoorObject *Door, Character *Char)
7{
8 int crashStop;
9 int Args[2] = {Door->Door.ID, 0};
10 if(server_started)
11 {
12 if(Char)
13 {
14 Args[1] = Char->Number;
15 }
16 else
17 {
18 Args[1] = -1;
19 }
20 }
21 crashStop = !server_started || FLsPublic_Event(EV_DOOR_OPEN, Args);
22 return (char*)(Door->Door.class);
23}
24short ONICALL FLrHook_ConsoleActivate( void *inObject, Character *inCharacter )
25{
26 if(server_started)
27 {
28 int Args[2] = {*((char*)inObject + 0x2C), inCharacter->Number};
29 FLsPublic_Event(EV_CONSOLE_USE, Args);
30 }
31 return OBJrConsole_OnActivate( inObject, inCharacter );
32}
33
34/*
35void FLrHook_Lasers( Character* PlayerChar )
36{
37 if(server_started || client_connected)
38 {
39 int i;
40 for(i = 0; i < MAX_PLAYERS; i++)
41 {
42 if(PlayerList[i] && PlayerList[i]->Chr && PlayerList[i]->Chr->Inventory.Weapons[0])
43 {
44 ONiDrawWeaponSight( PlayerList[i]->Chr );
45 }
46 }
47 }
48 else
49 {
50 if(
51 ONiDrawWeaponSight( ONgGameState->PlayerCharacter );
52 }
53}
54*/
55
56void ONICALL FLrHook_Lasers( Character* Char )
57{
58 ONiDrawWeaponSight( Char );
59 AI2rDisplayDebuggingInfo( Char );
60}
Note: See TracBrowser for help on using the repository browser.