forked from vera/halflife-thewastes-sdk
95 lines
4.6 KiB
C++
95 lines
4.6 KiB
C++
/***
|
|
*
|
|
* Copyright (c) 1996-2001, 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"
|
|
|
|
extern "C"
|
|
{
|
|
// Events
|
|
void EV_BerettaShoot (struct event_args_s *args);
|
|
void EV_ColtShoot (struct event_args_s *args);
|
|
void EV_DeagleShoot (struct event_args_s *args);
|
|
void EV_RugerShoot (struct event_args_s *args);
|
|
void EV_HandcannonShoot(struct event_args_s *args);
|
|
void EV_SawedOffShoot (struct event_args_s *args);
|
|
void EV_MossbergShoot (struct event_args_s *args);
|
|
void EV_WinchesterShoot(struct event_args_s *args);
|
|
void EV_Smg9Shoot (struct event_args_s *args);
|
|
void EV_FnFalShoot (struct event_args_s *args);
|
|
void EV_TommyGunShoot (struct event_args_s *args);
|
|
void EV_JackHammerShoot(struct event_args_s *args);
|
|
void EV_G11Shoot (struct event_args_s *args);
|
|
void EV_BoltRifleShoot (struct event_args_s *args);
|
|
void EV_StenShoot (struct event_args_s *args);
|
|
void EV_MolotovCocktail(struct event_args_s *args);
|
|
void EV_FragGrenade (struct event_args_s *args);
|
|
void EV_Pipebomb (struct event_args_s *args);
|
|
void EV_CombatKnife (struct event_args_s *args);
|
|
void EV_BaseballBat (struct event_args_s *args);
|
|
void EV_SledgeHammer (struct event_args_s *args);
|
|
void EV_Katana (struct event_args_s *args);
|
|
void EV_Spear (struct event_args_s *args);
|
|
void EV_CattleProd (struct event_args_s *args);
|
|
void EV_AkimboBerettas (struct event_args_s *args);
|
|
void EV_AkimboColts (struct event_args_s *args);
|
|
void EV_AkimboDeagles (struct event_args_s *args);
|
|
void EV_AkimboSawedOffs(struct event_args_s *args);
|
|
}
|
|
|
|
/*
|
|
======================
|
|
Game_HookEvents
|
|
|
|
Associate script file name with callback functions. Callback's must be extern "C" so
|
|
the engine doesn't get confused about name mangling stuff. Note that the format is
|
|
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.
|
|
======================
|
|
*/
|
|
void Game_HookEvents( void )
|
|
{
|
|
gEngfuncs.pfnHookEvent( "events/beretta.sc", EV_BerettaShoot );
|
|
gEngfuncs.pfnHookEvent( "events/colt.sc", EV_ColtShoot );
|
|
gEngfuncs.pfnHookEvent( "events/deagle.sc", EV_DeagleShoot );
|
|
gEngfuncs.pfnHookEvent( "events/ruger.sc", EV_RugerShoot );
|
|
gEngfuncs.pfnHookEvent( "events/handcannon.sc", EV_HandcannonShoot );
|
|
gEngfuncs.pfnHookEvent( "events/sawedoff.sc", EV_SawedOffShoot );
|
|
gEngfuncs.pfnHookEvent( "events/mossberg.sc", EV_MossbergShoot );
|
|
gEngfuncs.pfnHookEvent( "events/winchester.sc", EV_WinchesterShoot );
|
|
gEngfuncs.pfnHookEvent( "events/smg9.sc", EV_Smg9Shoot );
|
|
gEngfuncs.pfnHookEvent( "events/fnfal.sc", EV_FnFalShoot );
|
|
gEngfuncs.pfnHookEvent( "events/tommygun.sc", EV_TommyGunShoot );
|
|
gEngfuncs.pfnHookEvent( "events/jackhammer.sc", EV_JackHammerShoot );
|
|
gEngfuncs.pfnHookEvent( "events/g11.sc", EV_G11Shoot );
|
|
gEngfuncs.pfnHookEvent( "events/boltrifle.sc", EV_BoltRifleShoot );
|
|
gEngfuncs.pfnHookEvent( "events/sten.sc", EV_StenShoot );
|
|
gEngfuncs.pfnHookEvent( "events/molotovcocktail.sc", EV_MolotovCocktail );
|
|
gEngfuncs.pfnHookEvent( "events/fraggrenade.sc", EV_FragGrenade );
|
|
gEngfuncs.pfnHookEvent( "events/pipebomb.sc", EV_Pipebomb );
|
|
gEngfuncs.pfnHookEvent( "events/combatknife.sc", EV_CombatKnife );
|
|
gEngfuncs.pfnHookEvent( "events/baseballbat.sc", EV_BaseballBat );
|
|
gEngfuncs.pfnHookEvent( "events/sledgehammer.sc", EV_SledgeHammer );
|
|
gEngfuncs.pfnHookEvent( "events/katana.sc", EV_Katana );
|
|
gEngfuncs.pfnHookEvent( "events/spear.sc", EV_Spear );
|
|
gEngfuncs.pfnHookEvent( "events/cattleprod.sc", EV_CattleProd );
|
|
gEngfuncs.pfnHookEvent( "events/akimboberettas.sc", EV_AkimboBerettas );
|
|
gEngfuncs.pfnHookEvent( "events/akimbocolts.sc", EV_AkimboColts );
|
|
gEngfuncs.pfnHookEvent( "events/akimbodeagles.sc", EV_AkimboDeagles );
|
|
gEngfuncs.pfnHookEvent( "events/akimbosawedoffs.sc", EV_AkimboSawedOffs );
|
|
}
|