This repository has been archived on 2022-06-27. You can view files and clone it, but cannot push or open issues or pull requests.
Xash3DArchive/vprogs/impulses.c

35 lines
900 B
C

/*
+--------+
|Impulses|
+--------+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
| Scratch Http://www.admdev.com/scratch |
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
| Handle and execute "Impulse" commands - as entered from console. |
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
*/
void() CheckImpulses =
{
if (pev->impulse == 15)
CCam ();
if(pev->impulse == 10)
{
local string a;
a = ftos(pev->items);
sprint(pev, a);
sprint(pev, "Items Printed\n");
}
if(pev->impulse == 11)
{
pev->items = pev->items + 8;
sprint(pev, "Items added to\{136}\n");
}
if(pev->impulse == 150)
{
IEM_effects(TE_TELEPORT, pev->origin);
}
pev->impulse = 0; // Clear impulse list.
};