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/ents/triggers/trigger_setskill.c

30 lines
498 B
C
Raw Normal View History

2007-09-04 22:00:00 +02:00
/*
+================+
|TRIGGER_SETSKILL|
+================+====================+
|Description; |
2007-09-16 22:00:00 +02:00
|Set skill to value of pev->message. |
2007-09-04 22:00:00 +02:00
+=====================================+
*/
void() trigger_setskill_touch =
{
if (other.classname != "player")
return;
2007-09-16 22:00:00 +02:00
if(pev->touched == FALSE)
2007-09-04 22:00:00 +02:00
{
2007-09-16 22:00:00 +02:00
cvar_set ("skill", pev->message);
2007-09-04 22:00:00 +02:00
}
};
void() trigger_setskill =
{
trigger_setup();
2007-09-16 22:00:00 +02:00
pev->classname = "setskill";
2007-09-04 22:00:00 +02:00
2007-09-16 22:00:00 +02:00
pev->touch = trigger_setskill_touch;
2007-09-04 22:00:00 +02:00
};