]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/mutators/mutator/itemstime.qc
Stop using stats for itemstime
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mutators / mutator / itemstime.qc
1 REGISTER_MUTATOR(itemstime, true);
2
3 #ifdef SVQC
4 void IT_Write(entity e, int i, float f) {
5     if (!IS_REAL_CLIENT(e)) return;
6     msg_entity = e;
7     WriteByte(MSG_ONE, SVC_TEMPENTITY);
8     WriteMutator(MSG_ONE, itemstime);
9     WriteByte(MSG_ONE, i);
10     WriteFloat(MSG_ONE, f);
11 }
12 #endif
13
14 #ifdef CSQC
15 MUTATOR_HOOKFUNCTION(itemstime, CSQC_Parse_TempEntity) {
16     if (MUTATOR_RETURNVALUE) return false;
17     if (!ReadMutatorEquals(mutator_argv_int_0, itemstime)) return false;
18     int i = ReadByte();
19     float f = ReadFloat();
20     ItemsTime_time[i] = f;
21     return true;
22 }
23 #endif