2022-12-17 13:32:43 +01:00
|
|
|
/***
|
2013-08-30 13:34:05 -07:00
|
|
|
*
|
|
|
|
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
|
|
|
|
*
|
|
|
|
* This product contains software technology licensed from Id
|
|
|
|
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
|
|
|
|
* All Rights Reserved.
|
|
|
|
*
|
|
|
|
* Use, distribution, and modification of this source code and/or resulting
|
|
|
|
* object code is restricted to non-commercial enhancements to products from
|
|
|
|
* Valve LLC. All other use, distribution, or modification is prohibited
|
|
|
|
* without written permission from Valve LLC.
|
|
|
|
*
|
|
|
|
****/
|
|
|
|
#include "../hud.h"
|
|
|
|
#include "../cl_util.h"
|
|
|
|
#include "event_api.h"
|
2021-03-17 10:56:21 +01:00
|
|
|
#include "pmtrace.h"
|
|
|
|
#include "ev_hldm.h"
|
2013-08-30 13:34:05 -07:00
|
|
|
|
|
|
|
/*
|
|
|
|
======================
|
|
|
|
Game_HookEvents
|
|
|
|
|
2021-11-18 18:24:18 +01:00
|
|
|
Associate script file name with callback functions. Note that the format is
|
2013-08-30 13:34:05 -07:00
|
|
|
always the same. Of course, a clever mod team could actually embed parameters, behavior
|
|
|
|
into the actual .sc files and create a .sc file parser and hook their functionality through
|
|
|
|
that.. i.e., a scripting system.
|
|
|
|
|
|
|
|
That was what we were going to do, but we ran out of time...oh well.
|
|
|
|
======================
|
|
|
|
*/
|
2021-03-05 20:54:33 +01:00
|
|
|
void Game_HookEvents()
|
2013-08-30 13:34:05 -07:00
|
|
|
{
|
2021-11-28 16:54:48 +01:00
|
|
|
gEngfuncs.pfnHookEvent("events/glock1.sc", EV_FireGlock1);
|
|
|
|
gEngfuncs.pfnHookEvent("events/glock2.sc", EV_FireGlock2);
|
|
|
|
gEngfuncs.pfnHookEvent("events/shotgun1.sc", EV_FireShotGunSingle);
|
|
|
|
gEngfuncs.pfnHookEvent("events/shotgun2.sc", EV_FireShotGunDouble);
|
|
|
|
gEngfuncs.pfnHookEvent("events/mp5.sc", EV_FireMP5);
|
|
|
|
gEngfuncs.pfnHookEvent("events/mp52.sc", EV_FireMP52);
|
|
|
|
gEngfuncs.pfnHookEvent("events/python.sc", EV_FirePython);
|
|
|
|
gEngfuncs.pfnHookEvent("events/gauss.sc", EV_FireGauss);
|
|
|
|
gEngfuncs.pfnHookEvent("events/gaussspin.sc", EV_SpinGauss);
|
|
|
|
gEngfuncs.pfnHookEvent("events/train.sc", EV_TrainPitchAdjust);
|
2024-09-21 21:15:55 +02:00
|
|
|
gEngfuncs.pfnHookEvent("events/vehicle.sc", EV_VehiclePitchAdjust);
|
2021-11-28 16:54:48 +01:00
|
|
|
gEngfuncs.pfnHookEvent("events/crowbar.sc", EV_Crowbar);
|
|
|
|
gEngfuncs.pfnHookEvent("events/crossbow1.sc", EV_FireCrossbow);
|
|
|
|
gEngfuncs.pfnHookEvent("events/crossbow2.sc", EV_FireCrossbow2);
|
|
|
|
gEngfuncs.pfnHookEvent("events/rpg.sc", EV_FireRpg);
|
|
|
|
gEngfuncs.pfnHookEvent("events/egon_fire.sc", EV_EgonFire);
|
|
|
|
gEngfuncs.pfnHookEvent("events/egon_stop.sc", EV_EgonStop);
|
|
|
|
gEngfuncs.pfnHookEvent("events/firehornet.sc", EV_HornetGunFire);
|
|
|
|
gEngfuncs.pfnHookEvent("events/tripfire.sc", EV_TripmineFire);
|
|
|
|
gEngfuncs.pfnHookEvent("events/snarkfire.sc", EV_SnarkFire);
|
2013-08-30 13:34:05 -07:00
|
|
|
}
|