1 | #include "Flatline.h"
|
---|
2 | #include "Flatline_Hooks.h"
|
---|
3 | #include "Flatline_Server.h"
|
---|
4 |
|
---|
5 | //Don't modify this.
|
---|
6 | char * 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 | }
|
---|
24 | short 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 | int FLrHook_DebugNameTextureInit(short width, short height, int type, int allocated, int flags, char* name, void** output)
|
---|
35 | {
|
---|
36 | //flags = (1 << 10);
|
---|
37 | type = 1;
|
---|
38 | //DDrPatch_Byte( 0x005EB83C + 3, 0xff );
|
---|
39 | DDrPatch_Int32( 0x005EB83C, 0xFF000000 );
|
---|
40 | return M3rTextureMap_New(width, height, type, allocated, flags, name, output);
|
---|
41 | }
|
---|
42 |
|
---|
43 | short FLrHook_DebugNameShadeHack( Character* Char )
|
---|
44 | {
|
---|
45 |
|
---|
46 | return TSrContext_SetShade(*(void**)0x005EB844, ONrCharacter_GetHealthShade( Char->Health, Char->MaxHealth ));
|
---|
47 | //return TSrContext_SetShade(*(void**)0x005EB844, 0xFFFFFFFF);
|
---|
48 | }
|
---|
49 | /*
|
---|
50 | void FLrHook_Lasers( Character* PlayerChar )
|
---|
51 | {
|
---|
52 | if(server_started || client_connected)
|
---|
53 | {
|
---|
54 | int i;
|
---|
55 | for(i = 0; i < MAX_PLAYERS; i++)
|
---|
56 | {
|
---|
57 | if(PlayerList[i] && PlayerList[i]->Chr && PlayerList[i]->Chr->Inventory.Weapons[0])
|
---|
58 | {
|
---|
59 | ONiDrawWeaponSight( PlayerList[i]->Chr );
|
---|
60 | }
|
---|
61 | }
|
---|
62 | }
|
---|
63 | else
|
---|
64 | {
|
---|
65 | if(
|
---|
66 | ONiDrawWeaponSight( ONgGameState->PlayerCharacter );
|
---|
67 | }
|
---|
68 | }
|
---|
69 | */
|
---|
70 |
|
---|
71 | void FLrHook_Lasers( Character* Char )
|
---|
72 | {
|
---|
73 | ONiDrawWeaponSight( Char );
|
---|
74 | AI2rDisplayDebuggingInfo( Char );
|
---|
75 | }
|
---|