#define use use1
authorTimePath <andrew.hardaker1995@gmail.com>
Mon, 28 Mar 2016 03:05:09 +0000 (14:05 +1100)
committerTimePath <andrew.hardaker1995@gmail.com>
Mon, 28 Mar 2016 03:05:09 +0000 (14:05 +1100)
66 files changed:
qcsrc/common/debug.qh
qcsrc/common/gamemodes/gamemode/onslaught/onslaught.qc
qcsrc/common/minigames/cl_minigames_hud.qc
qcsrc/common/monsters/monster/shambler.qc
qcsrc/common/monsters/monster/spider.qc
qcsrc/common/monsters/sv_monsters.qc
qcsrc/common/t_items.qc
qcsrc/common/triggers/func/breakable.qc
qcsrc/common/triggers/func/button.qc
qcsrc/common/triggers/func/conveyor.qc
qcsrc/common/triggers/func/door.qc
qcsrc/common/triggers/func/door_rotating.qc
qcsrc/common/triggers/func/door_secret.qc
qcsrc/common/triggers/func/plat.qc
qcsrc/common/triggers/func/pointparticles.qc
qcsrc/common/triggers/func/train.qc
qcsrc/common/triggers/misc/laser.qc
qcsrc/common/triggers/platforms.qc
qcsrc/common/triggers/target/changelevel.qc
qcsrc/common/triggers/target/music.qc
qcsrc/common/triggers/target/spawn.qc
qcsrc/common/triggers/target/speaker.qc
qcsrc/common/triggers/target/voicescript.qc
qcsrc/common/triggers/trigger/counter.qc
qcsrc/common/triggers/trigger/delay.qc
qcsrc/common/triggers/trigger/disablerelay.qc
qcsrc/common/triggers/trigger/flipflop.qc
qcsrc/common/triggers/trigger/gamestart.qc
qcsrc/common/triggers/trigger/gravity.qc
qcsrc/common/triggers/trigger/hurt.qc
qcsrc/common/triggers/trigger/jumppads.qc
qcsrc/common/triggers/trigger/keylock.qc
qcsrc/common/triggers/trigger/monoflop.qc
qcsrc/common/triggers/trigger/multi.qc
qcsrc/common/triggers/trigger/multivibrator.qc
qcsrc/common/triggers/trigger/relay.qc
qcsrc/common/triggers/trigger/relay_activators.qc
qcsrc/common/triggers/trigger/relay_if.qc
qcsrc/common/triggers/trigger/relay_teamcheck.qc
qcsrc/common/triggers/trigger/secret.qc
qcsrc/common/triggers/trigger/teleport.qc
qcsrc/common/triggers/triggers.qc
qcsrc/common/turrets/sv_turrets.qc
qcsrc/common/turrets/turret/ewheel.qc
qcsrc/common/turrets/turret/walker.qc
qcsrc/common/util.qh
qcsrc/common/vehicles/sv_vehicles.qc
qcsrc/common/vehicles/vehicle/racer_weapon.qc
qcsrc/common/vehicles/vehicle/spiderbot_weapons.qc
qcsrc/common/weapons/weapon/arc.qc
qcsrc/common/weapons/weapon/electro.qc
qcsrc/common/weapons/weapon/fireball.qc
qcsrc/common/weapons/weapon/hagar.qc
qcsrc/common/weapons/weapon/hook.qc
qcsrc/common/weapons/weapon/mortar.qc
qcsrc/common/weapons/weapon/seeker.qc
qcsrc/common/weapons/weapon/vaporizer.qc
qcsrc/dpdefs/csprogsdefs.qh
qcsrc/dpdefs/progsdefs.qh
qcsrc/lib/warpzone/server.qc
qcsrc/server/g_lights.qc
qcsrc/server/g_models.qc
qcsrc/server/miscfunctions.qc
qcsrc/server/mutators/mutator/gamemode_assault.qc
qcsrc/server/race.qc
qcsrc/server/spawnpoints.qc

index e20139a..40b2b35 100644 (file)
@@ -116,7 +116,7 @@ bool autocvar_debugdraw;
 //                                             if (it.maxs) break;
 //                                             if (it.size) break;
 //                                             if (it.touch) break;
-//                                             if (it.use1) break;
+//                                             if (it.use) break;
 //                                             if (it.think) break;
 //                                             if (it.blocked) break;
 //                                             if (it.nextthink) break;
index 056d33a..ec69def 100644 (file)
@@ -1954,7 +1954,7 @@ void ons_MonsterSpawn_Delayed(entity this)
                {
                        own.team = e.team;
 
-                       own.use1(own, e, NULL);
+                       own.use(own, e, NULL);
                }
        }
 
@@ -1984,7 +1984,7 @@ void ons_TurretSpawn_Delayed(entity this)
                        own.team = e.team;
                        own.active = ACTIVE_NOT;
 
-                       own.use1(own, e, NULL);
+                       own.use(own, e, NULL);
                }
        }
 
index 23ac453..56cae3c 100644 (file)
@@ -115,7 +115,7 @@ void HUD_MinigameMenu_Click(entity menuitem)
 {
        if ( menuitem )
        {
-               menuitem.use1(menuitem, NULL, NULL);
+               menuitem.use(menuitem, NULL, NULL);
        }
 }
 
@@ -154,7 +154,7 @@ entity HUD_MinigameMenu_SpawnEntry(string s, vector offset, vector fontsize, vec
        entry.size = fontsize;
        entry.colormod = color;
        entry.flags = 0;
-       entry.use1 = click;
+       entry.use = click;
        panel_pos_y += fontsize_y;
        return entry;
 }
index eb3dfba..139967a 100644 (file)
@@ -128,7 +128,7 @@ void M_Shambler_Attack_Lightning_Touch()
 {SELFPARAM();
        PROJECTILE_TOUCH;
 
-       self.use1(this, NULL, NULL);
+       self.use(this, NULL, NULL);
 }
 
 void M_Shambler_Attack_Lightning_Think()
@@ -162,7 +162,7 @@ void M_Shambler_Attack_Lightning(entity this)
        gren.cnt = time + 5;
        gren.nextthink = time;
        gren.think = M_Shambler_Attack_Lightning_Think;
-       gren.use1 = M_Shambler_Attack_Lightning_Explode_use;
+       gren.use = M_Shambler_Attack_Lightning_Explode_use;
        gren.touch = M_Shambler_Attack_Lightning_Touch;
 
        gren.takedamage = DAMAGE_YES;
index c477d3e..0b2e365 100644 (file)
@@ -173,7 +173,7 @@ void M_Spider_Attack_Web(entity this)
 
        entity proj = new(plasma);
        proj.owner = proj.realowner = this;
-       proj.use1 = M_Spider_Attack_Web_Explode_use;
+       proj.use = M_Spider_Attack_Web_Explode_use;
        proj.think = adaptor_think2use_hittype_splash;
        proj.bot_dodge = true;
        proj.bot_dodgerating = 0;
index d1276fa..def29e9 100644 (file)
@@ -946,7 +946,7 @@ bool Monster_Appear_Check(entity this, int monster_id)
        this.think = func_null;
        this.monsterid = monster_id; // set so this monster is properly registered (otherwise, normal initialization is used)
        this.nextthink = 0;
-       this.use1 = Monster_Appear;
+       this.use = Monster_Appear;
        this.flags = FL_MONSTER; // set so this monster can get butchered
 
        return true;
@@ -1332,7 +1332,7 @@ bool Monster_Spawn(entity this, int mon_id)
        this.monsterid                  = mon_id;
        this.event_damage               = Monster_Damage;
        this.touch                              = Monster_Touch;
-       this.use1                               = Monster_Use;
+       this.use                                = Monster_Use;
        this.solid                              = SOLID_BBOX;
        this.movetype                   = MOVETYPE_WALK;
        this.spawnshieldtime    = time + autocvar_g_monsters_spawnshieldtime;
index 2c1b2a8..957a6fc 100644 (file)
@@ -1453,7 +1453,7 @@ spawnfunc(target_items)
        float n, i;
        string s;
 
-       self.use1 = target_items_use;
+       self.use = target_items_use;
        if(!self.strength_finished)
                self.strength_finished = autocvar_g_balance_powerup_strength_time;
        if(!self.invincible_finished)
index 112d7cc..34a048c 100644 (file)
@@ -137,7 +137,7 @@ void func_breakable_behave_destroyed()
        self.event_damage = func_null;
        self.state = 1;
        if(self.spawnflags & 4)
-               self.use1 = func_null;
+               self.use = func_null;
        func_breakable_colormod();
        if (self.noise1)
                stopsound (self, CH_TRIGGER_SINGLE);
@@ -322,9 +322,9 @@ spawnfunc(func_breakable)
        SetBrushEntityModel();
 
        if(this.spawnflags & 4)
-               this.use1 = func_breakable_destroy;
+               this.use = func_breakable_destroy;
        else
-               this.use1 = func_breakable_restore;
+               this.use = func_breakable_restore;
 
        if(this.spawnflags & 4)
        {
index ba61271..a1cabdc 100644 (file)
@@ -120,7 +120,7 @@ spawnfunc(func_button)
        self.effects |= EF_LOWPRECISION;
 
        self.blocked = button_blocked;
-       self.use1 = button_use;
+       self.use = button_use;
 
 //     if (self.health == 0) // all buttons are now shootable
 //             self.health = 10;
index 93b6502..5cd17e7 100644 (file)
@@ -116,7 +116,7 @@ void conveyor_init()
        this.nextthink = time;
        IFTARGETED
        {
-               this.use1 = conveyor_use;
+               this.use = conveyor_use;
                this.reset = conveyor_reset;
                this.reset(this);
        }
index 0546b2e..30de40f 100644 (file)
@@ -738,7 +738,7 @@ spawnfunc(func_door)
        precache_sound(self.noise3);
 
        self.blocked = door_blocked;
-       self.use1 = door_use;
+       self.use = door_use;
 
        if(self.dmg && (self.message == ""))
                self.message = "was squished";
@@ -842,7 +842,7 @@ NET_HANDLE(ENT_CLIENT_DOOR, bool isnew)
                this.trigger_touch = door_touch;
                this.draw = door_draw;
                this.drawmask = MASK_NORMAL;
-               this.use1 = door_use;
+               this.use = door_use;
 
                LinkDoors(this);
 
index f552090..4c97fe6 100644 (file)
@@ -72,7 +72,7 @@ spawnfunc(func_door_rotating)
        self.classname = "door_rotating";
 
        self.blocked = door_blocked;
-       self.use1 = door_use;
+       self.use = door_use;
 
     if(self.spawnflags & 8)
         self.dmg = 10000;
index 0091448..3e45302 100644 (file)
@@ -216,7 +216,7 @@ spawnfunc(func_door_secret)
        this.touch = secret_touch;
        this.blocked = secret_blocked;
        this.speed = 50;
-       this.use1 = fd_secret_use;
+       this.use = fd_secret_use;
        IFTARGETED
        {
        }
index badddf4..14cfa56 100644 (file)
@@ -171,7 +171,7 @@ NET_HANDLE(ENT_CLIENT_PLAT, bool isnew)
                this.movetype = MOVETYPE_PUSH;
                this.drawmask = MASK_NORMAL;
                this.draw = plat_draw;
-               this.use1 = plat_use;
+               this.use = plat_use;
                this.entremove = trigger_remove_generic;
 
                plat_reset(this); // also called here
index 6c2bb43..9cec88f 100644 (file)
@@ -137,7 +137,7 @@ spawnfunc(func_pointparticles)
 
        IFTARGETED
        {
-               this.use1 = pointparticles_use;
+               this.use = pointparticles_use;
                this.reset = pointparticles_reset;
                this.reset(this);
        }
index 0fa3ed6..013d459 100644 (file)
@@ -43,7 +43,7 @@ void train_wait()
        entity tg = find(world, targetname, self.target);
        if(tg.spawnflags & 4)
        {
-               self.use1 = train_use;
+               self.use = train_use;
                self.SUB_THINK = func_null;
                self.SUB_NEXTTHINK = 0;
        }
@@ -180,7 +180,7 @@ void train_use(entity this, entity actor, entity trigger)
 {
        this.SUB_NEXTTHINK = this.SUB_LTIME + 1;
        this.SUB_THINK = train_next;
-       this.use1 = func_null; // not again
+       this.use = func_null; // not again
 }
 
 void func_train_find(entity this)
@@ -224,7 +224,7 @@ spawnfunc(func_train)
        self.effects |= EF_LOWPRECISION;
 
        if(self.spawnflags & 4)
-               self.use1 = train_use;
+               self.use = train_use;
 
        if (self.spawnflags & 2)
        {
index 9c388f6..6e589ed 100644 (file)
@@ -244,7 +244,7 @@ spawnfunc(misc_laser)
        {
                this.reset = laser_reset;
                this.reset(this);
-               this.use1 = laser_use;
+               this.use = laser_use;
        }
        else
                this.state = 1;
index b9937f0..7429f2b 100644 (file)
@@ -178,7 +178,7 @@ void plat_crush()
 
 void plat_use(entity this, entity actor, entity trigger)
 {
-       this.use1 = func_null;
+       this.use = func_null;
        if (this.state != 4)
                objerror ("plat_use: not in up state");
        WITHSELF(this, plat_go_down());
@@ -192,13 +192,13 @@ void plat_reset(entity this)
        {
                setorigin (this, this.pos1);
                this.state = 4;
-               this.use1 = plat_use;
+               this.use = plat_use;
        }
        else
        {
                setorigin (this, this.pos2);
                this.state = 2;
-               this.use1 = plat_trigger_use;
+               this.use = plat_trigger_use;
        }
 
 #ifdef SVQC
index 3962957..d4bc850 100644 (file)
@@ -34,7 +34,7 @@ void target_changelevel_use(entity this, entity actor, entity trigger)
 
 spawnfunc(target_changelevel)
 {
-       this.use1 = target_changelevel_use;
+       this.use = target_changelevel_use;
 
        if(!this.count) { this.count = 0.7; }
 }
index 0b06efb..c48a0ba 100644 (file)
@@ -60,7 +60,7 @@ void target_music_use(entity this, entity actor, entity trigger)
 }
 spawnfunc(target_music)
 {
-       self.use1 = target_music_use;
+       self.use = target_music_use;
        self.reset = target_music_reset;
        if(!self.volume)
                self.volume = 1;
@@ -148,7 +148,7 @@ spawnfunc(trigger_music)
        }
        trigger_music_reset(this);
 
-       this.use1 = trigger_music_use;
+       this.use = trigger_music_use;
        this.reset = trigger_music_reset;
 
        Net_LinkEntity(this, false, 0, trigger_music_SendEntity);
index e6114a5..74ac8fd 100644 (file)
@@ -330,7 +330,7 @@ void initialize_field_db()
 spawnfunc(target_spawn)
 {
        initialize_field_db();
-       self.use1 = target_spawn_use;
+       self.use = target_spawn_use;
        self.message = strzone(strreplace("'", "\"", self.message));
        self.target_spawn_id = ++target_spawn_count;
        InitializeEntity(self, target_spawn_spawnfirst, INITPRIO_LAST);
index c095597..046128f 100644 (file)
@@ -54,23 +54,23 @@ void target_speaker_use_on(entity this, entity actor, entity trigger)
                snd = this.noise;
        _sound(this, CH_TRIGGER_SINGLE, snd, VOL_BASE * this.volume, this.atten);
        if(this.spawnflags & 3)
-               this.use1 = target_speaker_use_off;
+               this.use = target_speaker_use_off;
 }
 void target_speaker_use_off(entity this, entity actor, entity trigger)
 {
        sound(this, CH_TRIGGER_SINGLE, SND_Null, VOL_BASE * this.volume, this.atten);
-       this.use1 = target_speaker_use_on;
+       this.use = target_speaker_use_on;
 }
 void target_speaker_reset(entity this)
 {
        if(this.spawnflags & 1) // LOOPED_ON
        {
-               if(this.use1 == target_speaker_use_on)
+               if(this.use == target_speaker_use_on)
                        target_speaker_use_on(this, NULL, NULL);
        }
        else if(this.spawnflags & 2)
        {
-               if(this.use1 == target_speaker_use_off)
+               if(this.use == target_speaker_use_off)
                        target_speaker_use_off(this, NULL, NULL);
        }
 }
@@ -98,7 +98,7 @@ spawnfunc(target_speaker)
        IFTARGETED
        {
                if(self.spawnflags & 8) // ACTIVATOR
-                       self.use1 = target_speaker_use_activator;
+                       self.use = target_speaker_use_activator;
                else if(self.spawnflags & 1) // LOOPED_ON
                {
                        target_speaker_use_on(self, NULL, NULL);
@@ -106,11 +106,11 @@ spawnfunc(target_speaker)
                }
                else if(self.spawnflags & 2) // LOOPED_OFF
                {
-                       self.use1 = target_speaker_use_on;
+                       self.use = target_speaker_use_on;
                        self.reset = target_speaker_reset;
                }
                else
-                       self.use1 = target_speaker_use_on;
+                       self.use = target_speaker_use_on;
        }
        else if(self.spawnflags & 1) // LOOPED_ON
        {
index b6ed6dc..e843317 100644 (file)
@@ -84,7 +84,7 @@ spawnfunc(target_voicescript)
        // delay: initial delay before the first message
 
        float i, n;
-       self.use1 = target_voicescript_use;
+       self.use = target_voicescript_use;
 
        n = tokenize_console(self.message);
        self.cnt = n / 2;
index 07e5de6..5ada680 100644 (file)
@@ -43,7 +43,7 @@ spawnfunc(trigger_counter)
                self.count = 2;
        self.cnt = self.count;
 
-       self.use1 = counter_use;
+       self.use = counter_use;
        self.reset = counter_reset;
 }
 #endif
index 3329fc3..02c1aa9 100644 (file)
@@ -16,7 +16,7 @@ spawnfunc(trigger_delay)
     if(!self.wait)
         self.wait = 1;
 
-    self.use1 = delay_use;
+    self.use = delay_use;
     self.reset = delay_reset;
 }
 #endif
index 137213f..a09e0ba 100644 (file)
@@ -5,14 +5,14 @@ void trigger_disablerelay_use(entity this, entity actor, entity trigger)
 
        for(entity e = world; (e = find(e, targetname, this.target)); )
        {
-               if(e.use1 == SUB_UseTargets)
+               if(e.use == SUB_UseTargets)
                {
-                       e.use1 = SUB_DontUseTargets;
+                       e.use = SUB_DontUseTargets;
                        ++a;
                }
-               else if(e.use1 == SUB_DontUseTargets)
+               else if(e.use == SUB_DontUseTargets)
                {
-                       e.use1 = SUB_UseTargets;
+                       e.use = SUB_UseTargets;
                        ++b;
                }
        }
@@ -23,6 +23,6 @@ void trigger_disablerelay_use(entity this, entity actor, entity trigger)
 
 spawnfunc(trigger_disablerelay)
 {
-       this.use1 = trigger_disablerelay_use;
+       this.use = trigger_disablerelay_use;
 }
 #endif
index 8265d12..e4923bd 100644 (file)
@@ -13,7 +13,7 @@ spawnfunc(trigger_flipflop)
 {
     if(this.spawnflags & 1)
         this.state = 1;
-    this.use1 = flipflop_use;
+    this.use = flipflop_use;
     this.reset = spawnfunc_trigger_flipflop; // perfect resetter
 }
 
index 9e2cc26..5f3206a 100644 (file)
@@ -13,7 +13,7 @@ void gamestart_use_this(entity this)
 void self_spawnfunc_trigger_gamestart();
 spawnfunc(trigger_gamestart)
 {
-       this.use1 = gamestart_use;
+       this.use = gamestart_use;
        this.reset2 = self_spawnfunc_trigger_gamestart;
 
        if(this.wait)
index 1f61e50..c7dd586 100644 (file)
@@ -98,7 +98,7 @@ spawnfunc(trigger_gravity)
        self.state = true;
        IFTARGETED
        {
-               self.use1 = trigger_gravity_use;
+               self.use = trigger_gravity_use;
                if(self.spawnflags & 2)
                        self.state = false;
        }
index 1e29bf8..a7ee567 100644 (file)
@@ -62,7 +62,7 @@ spawnfunc(trigger_hurt)
        EXACTTRIGGER_INIT;
        self.active = ACTIVE_ACTIVE;
        self.touch = trigger_hurt_touch;
-       self.use1 = trigger_hurt_use;
+       self.use = trigger_hurt_use;
        self.enemy = world; // I hate you all
        if (!self.dmg)
                self.dmg = 1000;
index db3905b..e52e7c2 100644 (file)
@@ -381,7 +381,7 @@ spawnfunc(trigger_push)
        trigger_init(this);
 
        this.active = ACTIVE_ACTIVE;
-       this.use1 = trigger_push_use;
+       this.use = trigger_push_use;
        this.touch = trigger_push_touch;
 
        // normal push setup
index cc45e24..311075a 100644 (file)
@@ -4,8 +4,8 @@
 void trigger_keylock_trigger(entity this, entity actor, string s)
 {
        for(entity t = world; (t = find(t, targetname, s)); )
-               if(t.use1)
-                       t.use1(t, actor, this);
+               if(t.use)
+                       t.use(t, actor, this);
 }
 
 /**
index 4c0e27c..994d498 100644 (file)
@@ -38,9 +38,9 @@ spawnfunc(trigger_monoflop)
        if(!this.wait)
                this.wait = 1;
        if(this.spawnflags & 1)
-               this.use1 = monoflop_fixed_use;
+               this.use = monoflop_fixed_use;
        else
-               this.use1 = monoflop_use;
+               this.use = monoflop_use;
        this.think = monoflop_think;
        this.state = 0;
        this.reset = monoflop_reset;
index 5576e54..ce7bba6 100644 (file)
@@ -158,7 +158,7 @@ spawnfunc(trigger_multiple)
                self.wait = 0.2;
        else if(self.wait < -1)
                self.wait = 0;
-       self.use1 = multi_use;
+       self.use = multi_use;
 
        EXACTTRIGGER_INIT;
 
index 886bed5..a50f62b 100644 (file)
@@ -62,7 +62,7 @@ spawnfunc(trigger_multivibrator)
                self.respawntime = self.wait;
 
        self.state = 0;
-       self.use1 = multivibrator_toggle;
+       self.use = multivibrator_toggle;
        self.think = multivibrator_send;
        self.nextthink = max(1, time);
 
index a3fcb95..1df446b 100644 (file)
@@ -4,7 +4,7 @@ This fixed size trigger cannot be touched, it can only be fired by other events.
 */
 spawnfunc(trigger_relay)
 {
-       this.use1 = SUB_UseTargets;
+       this.use = SUB_UseTargets;
        this.reset = spawnfunc_trigger_relay; // this spawnfunc resets fully
 }
 #endif
index f47e4ae..dabbbd2 100644 (file)
@@ -22,18 +22,18 @@ void relay_activators_use(entity this, entity actor, entity trigger)
 spawnfunc(relay_activate)
 {
        this.cnt = ACTIVE_ACTIVE;
-       this.use1 = relay_activators_use;
+       this.use = relay_activators_use;
 }
 
 spawnfunc(relay_deactivate)
 {
        this.cnt = ACTIVE_NOT;
-       this.use1 = relay_activators_use;
+       this.use = relay_activators_use;
 }
 
 spawnfunc(relay_activatetoggle)
 {
        this.cnt = ACTIVE_TOGGLE;
-       this.use1 = relay_activators_use;
+       this.use = relay_activators_use;
 }
 #endif
index 1d7991c..ea90a06 100644 (file)
@@ -14,6 +14,6 @@ void trigger_relay_if_use(entity this, entity actor, entity trigger)
 
 spawnfunc(trigger_relay_if)
 {
-       this.use1 = trigger_relay_if_use;
+       this.use = trigger_relay_if_use;
 }
 #endif
index 289371f..2972d32 100644 (file)
@@ -29,7 +29,7 @@ void trigger_relay_teamcheck_reset(entity this)
 spawnfunc(trigger_relay_teamcheck)
 {
        this.team_saved = this.team;
-       this.use1 = trigger_relay_teamcheck_use;
+       this.use = trigger_relay_teamcheck_use;
        this.reset = trigger_relay_teamcheck_reset;
 }
 #endif
index cb64f96..f94cd00 100644 (file)
@@ -82,6 +82,6 @@ spawnfunc(trigger_secret)
        // take over the touch() function, so we can mark secret as found
        self.touch = trigger_secret_touch;
        // ignore triggering;
-       self.use1 = func_null;
+       self.use = func_null;
 }
 #endif
index 49e8cdb..c9b8147 100644 (file)
@@ -84,7 +84,7 @@ spawnfunc(trigger_teleport)
        self.active = ACTIVE_ACTIVE;
        //trigger_init(self); // only for predicted triggers?
        EXACTTRIGGER_INIT;
-       self.use1 = trigger_teleport_use;
+       self.use = trigger_teleport_use;
 
        if(self.noise != "")
                FOREACH_WORD(self.noise, true, precache_sound(it));
index 691aea5..4493138 100644 (file)
@@ -254,7 +254,7 @@ void SUB_UseTargets(entity this, entity actor, entity trigger)
                        int aw_flag = this.antiwall_flag;
                        for(entity t = world; (t = find(t, targetname, s)); )
                        {
-                               if(t.use1)
+                               if(t.use)
                                {
                                        if(this.target_random)
                                        {
@@ -265,7 +265,7 @@ void SUB_UseTargets(entity this, entity actor, entity trigger)
                                                if (t.classname == "func_clientwall" || t.classname == "func_clientillusionary")
                                                        t.antiwall_flag = aw_flag;
 
-                                               t.use1(t, actor, this);
+                                               t.use(t, actor, this);
                                        }
                                }
                        }
@@ -273,7 +273,7 @@ void SUB_UseTargets(entity this, entity actor, entity trigger)
        }
 
        if(this.target_random && RandomSelection_chosen_ent)
-               RandomSelection_chosen_ent.use1(RandomSelection_chosen_ent, actor, this);
+               RandomSelection_chosen_ent.use(RandomSelection_chosen_ent, actor, this);
 }
 
 void SUB_UseTargets_self()
index c226a98..2578c1e 100644 (file)
@@ -1341,7 +1341,7 @@ float turret_initialize(Turret tur)
        self.view_ofs                           = '0 0 0';
        self.turret_firecheckfunc       = turret_firecheck;
        self.event_damage                       = turret_damage;
-       self.use1                                       = turret_use;
+       self.use                                        = turret_use;
        self.bot_attack                         = true;
        self.nextthink                          = time + 1;
        self.nextthink                     += turret_count * sys_frametime;
index 1c3d573..0bdfca4 100644 (file)
@@ -49,8 +49,8 @@ void ewheel_move_path()
 
             if (self.pathgoal)
             {
-                if (self.pathgoal.use1)
-                    self.pathgoal.use1(self.pathgoal, NULL, NULL);
+                if (self.pathgoal.use)
+                    self.pathgoal.use(self.pathgoal, NULL, NULL);
 
                 if (self.pathgoal.enemy)
                 {
index d99479c..51ace9a 100644 (file)
@@ -312,8 +312,8 @@ void walker_move_path()
 
             if (self.pathgoal)
             {
-                if (self.pathgoal.use1)
-                    self.pathgoal.use1(self, NULL, NULL);
+                if (self.pathgoal.use)
+                    self.pathgoal.use(self, NULL, NULL);
 
                 if (self.pathgoal.enemy)
                 {
index 36bd8b5..ef36eb2 100644 (file)
@@ -2,7 +2,6 @@
 #define COMMON_UTIL_H
 
 #ifndef MENUQC
-.void(entity this, entity actor, entity trigger) use1;
 
 vector real_origin(entity ent);
 #endif
index 69907c0..fc44613 100644 (file)
@@ -262,7 +262,7 @@ entity vehicles_projectile(entity this, string _mzlfx, Sound _mzlsound,
        proj.bot_dodgerating  = _dmg;
        proj.velocity            = _vel;
        proj.touch                      = vehicles_projectile_explode;
-       proj.use1                         = vehicles_projectile_explode_use;
+       proj.use                          = vehicles_projectile_explode_use;
        proj.owner                      = this;
        proj.realowner          = _owner;
        proj.think                      = SUB_Remove_self;
@@ -1184,7 +1184,7 @@ bool vehicle_initialize(entity this, Vehicle info, bool nodrop)
                else
                {
                        this.team = this.vehicle_controller.team;
-                       this.use1 = vehicle_use;
+                       this.use = vehicle_use;
 
                        if(teamplay)
                        {
index 65f8245..36655fd 100644 (file)
@@ -74,7 +74,7 @@ void racer_rocket_tracker()
 
     if (IS_DEAD(self.owner) || self.cnt < time)
     {
-        self.use1(self, NULL, NULL);
+        self.use(self, NULL, NULL);
         return;
     }
 
@@ -126,7 +126,7 @@ void racer_rocket_groundhugger()
 
     if(IS_DEAD(self.owner) || self.cnt < time)
     {
-        self.use1(self, NULL, NULL);
+        self.use(self, NULL, NULL);
         return;
     }
 
index caf64c0..dd20967 100644 (file)
@@ -23,7 +23,7 @@ void spiderbot_rocket_unguided()
     UpdateCSQCProjectile(self);
 
     if (IS_DEAD(self.owner) || self.cnt < time || vdist(self.pos1 - self.origin, <, 16))
-        self.use1(self, NULL, NULL);
+        self.use(self, NULL, NULL);
 }
 
 void spiderbot_rocket_guided()
@@ -43,7 +43,7 @@ void spiderbot_rocket_guided()
     UpdateCSQCProjectile(self);
 
     if (IS_DEAD(self.owner) || self.cnt < time)
-        self.use1(self, NULL, NULL);
+        self.use(self, NULL, NULL);
 }
 
 void spiderbot_guide_release(entity this)
index 804a24f..cf391b0 100644 (file)
@@ -262,7 +262,7 @@ void W_Arc_Bolt_Damage(entity this, entity inflictor, entity attacker, float dam
 void W_Arc_Bolt_Touch()
 {SELFPARAM();
        PROJECTILE_TOUCH;
-       self.use1(this, NULL, NULL);
+       self.use(this, NULL, NULL);
 }
 
 void W_Arc_Attack_Bolt(Weapon thiswep)
@@ -287,7 +287,7 @@ void W_Arc_Attack_Bolt(Weapon thiswep)
        missile.damagedbycontents = true;
 
        missile.touch = W_Arc_Bolt_Touch;
-       missile.use1 = W_Arc_Bolt_Explode_use;
+       missile.use = W_Arc_Bolt_Explode_use;
        missile.think = adaptor_think2use_hittype_splash;
        missile.nextthink = time + WEP_CVAR(arc, bolt_lifetime);
        PROJECTILE_MAKETRIGGER(missile);
index 71ce3cb..315ea5a 100644 (file)
@@ -206,7 +206,7 @@ void W_Electro_Bolt_Think()
 {SELFPARAM();
        if(time >= self.ltime)
        {
-               this.use1(this, NULL, NULL);
+               this.use(this, NULL, NULL);
                return;
        }
 
@@ -247,7 +247,7 @@ void W_Electro_Bolt_Think()
 
                // if we triggered an orb, should we explode? if not, lets try again next time
                if(found && WEP_CVAR_PRI(electro, midaircombo_explode))
-                       { this.use1(this, NULL, NULL); }
+                       { this.use(this, NULL, NULL); }
                else
                        { self.nextthink = min(time + WEP_CVAR_PRI(electro, midaircombo_interval), self.ltime); }
        }
@@ -277,7 +277,7 @@ void W_Electro_Attack_Bolt(Weapon thiswep)
        proj.owner = proj.realowner = self;
        proj.bot_dodge = true;
        proj.bot_dodgerating = WEP_CVAR_PRI(electro, damage);
-       proj.use1 = W_Electro_Explode_use;
+       proj.use = W_Electro_Explode_use;
        proj.think = W_Electro_Bolt_Think;
        proj.nextthink = time;
        proj.ltime = time + WEP_CVAR_PRI(electro, lifetime);
@@ -347,7 +347,7 @@ void W_Electro_Orb_Damage(entity this, entity inflictor, entity attacker, float
                }
                else
                {
-                       this.use1 = W_Electro_Explode_use;
+                       this.use = W_Electro_Explode_use;
                        this.think = adaptor_think2use; // not _hittype_splash, as this runs "immediately"
                }
        }
@@ -374,7 +374,7 @@ void W_Electro_Attack_Orb(Weapon thiswep)
 
        entity proj = new(electro_orb);
        proj.owner = proj.realowner = self;
-       proj.use1 = W_Electro_Explode_use;
+       proj.use = W_Electro_Explode_use;
        proj.think = adaptor_think2use_hittype_splash;
        proj.bot_dodge = true;
        proj.bot_dodgerating = WEP_CVAR_SEC(electro, damage);
index a86def7..4bbcdb6 100644 (file)
@@ -201,7 +201,7 @@ void W_Fireball_Attack1()
        proj.bot_dodge = true;
        proj.bot_dodgerating = WEP_CVAR_PRI(fireball, damage);
        proj.pushltime = time + WEP_CVAR_PRI(fireball, lifetime);
-       proj.use1 = W_Fireball_Explode_use;
+       proj.use = W_Fireball_Explode_use;
        proj.think = W_Fireball_Think;
        proj.nextthink = time;
        proj.health = WEP_CVAR_PRI(fireball, health);
index 94d3e5f..2e648f7 100644 (file)
@@ -116,7 +116,7 @@ void W_Hagar_Damage(entity this, entity inflictor, entity attacker, float damage
 void W_Hagar_Touch()
 {SELFPARAM();
        PROJECTILE_TOUCH;
-       this.use1(this, NULL, NULL);
+       this.use(this, NULL, NULL);
 }
 
 void W_Hagar_Touch2()
@@ -124,7 +124,7 @@ void W_Hagar_Touch2()
        PROJECTILE_TOUCH;
 
        if(self.cnt > 0 || other.takedamage == DAMAGE_AIM) {
-               this.use1(this, NULL, NULL);
+               this.use(this, NULL, NULL);
        } else {
                self.cnt++;
                Send_Effect(EFFECT_HAGAR_BOUNCE, self.origin, self.velocity, 1);
@@ -156,7 +156,7 @@ void W_Hagar_Attack(Weapon thiswep)
        missile.damagedbycontents = true;
 
        missile.touch = W_Hagar_Touch;
-       missile.use1 = W_Hagar_Explode_use;
+       missile.use = W_Hagar_Explode_use;
        missile.think = adaptor_think2use_hittype_splash;
        missile.nextthink = time + WEP_CVAR_PRI(hagar, lifetime);
        PROJECTILE_MAKETRIGGER(missile);
@@ -199,7 +199,7 @@ void W_Hagar_Attack2(Weapon thiswep)
 
        missile.touch = W_Hagar_Touch2;
        missile.cnt = 0;
-       missile.use1 = W_Hagar_Explode2_use;
+       missile.use = W_Hagar_Explode2_use;
        missile.think = adaptor_think2use_hittype_splash;
        missile.nextthink = time + WEP_CVAR_SEC(hagar, lifetime_min) + random() * WEP_CVAR_SEC(hagar, lifetime_rand);
        PROJECTILE_MAKETRIGGER(missile);
@@ -257,7 +257,7 @@ void W_Hagar_Attack2_Load_Release(.entity weaponentity)
                missile.damagedbycontents = true;
 
                missile.touch = W_Hagar_Touch; // not bouncy
-               missile.use1 = W_Hagar_Explode2_use;
+               missile.use = W_Hagar_Explode2_use;
                missile.think = adaptor_think2use_hittype_splash;
                missile.nextthink = time + WEP_CVAR_SEC(hagar, lifetime_min) + random() * WEP_CVAR_SEC(hagar, lifetime_rand);
                PROJECTILE_MAKETRIGGER(missile);
index da14caa..fac16c4 100644 (file)
@@ -140,7 +140,7 @@ void W_Hook_Damage(entity this, entity inflictor, entity attacker, float damage,
 void W_Hook_Touch2()
 {SELFPARAM();
        PROJECTILE_TOUCH;
-       this.use1(this, NULL, NULL);
+       this.use(this, NULL, NULL);
 }
 
 void W_Hook_Attack2(Weapon thiswep, entity actor)
@@ -160,7 +160,7 @@ void W_Hook_Attack2(Weapon thiswep, entity actor)
 
        gren.nextthink = time + WEP_CVAR_SEC(hook, lifetime);
        gren.think = adaptor_think2use_hittype_splash;
-       gren.use1 = W_Hook_Explode2_use;
+       gren.use = W_Hook_Explode2_use;
        gren.touch = W_Hook_Touch2;
 
        gren.takedamage = DAMAGE_YES;
index f871da7..5fbacc7 100644 (file)
@@ -147,7 +147,7 @@ void W_Mortar_Grenade_Touch1()
        PROJECTILE_TOUCH;
        if(other.takedamage == DAMAGE_AIM || WEP_CVAR_PRI(mortar, type) == 0) // always explode when hitting a player, or if normal mortar projectile
        {
-               this.use1(this, NULL, NULL);
+               this.use(this, NULL, NULL);
        }
        else if(WEP_CVAR_PRI(mortar, type) == 1) // bounce
        {
@@ -179,7 +179,7 @@ void W_Mortar_Grenade_Touch2()
        PROJECTILE_TOUCH;
        if(other.takedamage == DAMAGE_AIM || WEP_CVAR_SEC(mortar, type) == 0) // always explode when hitting a player, or if normal mortar projectile
        {
-               this.use1(this, NULL, NULL);
+               this.use(this, NULL, NULL);
        }
        else if(WEP_CVAR_SEC(mortar, type) == 1) // bounce
        {
@@ -236,7 +236,7 @@ void W_Mortar_Attack(Weapon thiswep)
        gren.cnt = time + WEP_CVAR_PRI(mortar, lifetime);
        gren.nextthink = time;
        gren.think = W_Mortar_Grenade_Think1;
-       gren.use1 = W_Mortar_Grenade_Explode_use;
+       gren.use = W_Mortar_Grenade_Explode_use;
        gren.touch = W_Mortar_Grenade_Touch1;
 
        gren.takedamage = DAMAGE_YES;
@@ -283,7 +283,7 @@ void W_Mortar_Attack2(Weapon thiswep)
 
        gren.nextthink = time + WEP_CVAR_SEC(mortar, lifetime);
        gren.think = adaptor_think2use_hittype_splash;
-       gren.use1 = W_Mortar_Grenade_Explode2_use;
+       gren.use = W_Mortar_Grenade_Explode2_use;
        gren.touch = W_Mortar_Grenade_Touch2;
 
        gren.takedamage = DAMAGE_YES;
index 86ea7d1..6dffec3 100644 (file)
@@ -360,7 +360,7 @@ void W_Seeker_Fire_Flac(Weapon thiswep)
        missile.bot_dodge               = true;
        missile.bot_dodgerating = WEP_CVAR(seeker, flac_damage);
        missile.touch                   = W_Seeker_Flac_Explode;
-       missile.use1                    = W_Seeker_Flac_Explode_use;
+       missile.use                     = W_Seeker_Flac_Explode_use;
        missile.think                   = adaptor_think2use_hittype_splash;
        missile.nextthink               = time + WEP_CVAR(seeker, flac_lifetime) + WEP_CVAR(seeker, flac_lifetime_rand);
        missile.solid                   = SOLID_BBOX;
index f9cdc00..8ce6caa 100644 (file)
@@ -263,7 +263,7 @@ void W_RocketMinsta_Attack2()
         proj.owner = proj.realowner = self;
         proj.bot_dodge = true;
         proj.bot_dodgerating = autocvar_g_rm_laser_damage;
-        proj.use1 = W_RocketMinsta_Laser_Explode_use;
+        proj.use = W_RocketMinsta_Laser_Explode_use;
         proj.think = adaptor_think2use_hittype_splash;
         proj.nextthink = time + autocvar_g_rm_laser_lifetime;
         PROJECTILE_MAKETRIGGER(proj);
@@ -315,7 +315,7 @@ void W_RocketMinsta_Attack3 ()
         proj.owner = proj.realowner = self;
         proj.bot_dodge = true;
         proj.bot_dodgerating = autocvar_g_rm_laser_damage;
-        proj.use1 = W_RocketMinsta_Laser_Explode_use;
+        proj.use = W_RocketMinsta_Laser_Explode_use;
         proj.think = adaptor_think2use_hittype_splash;
         proj.nextthink = time + autocvar_g_rm_laser_lifetime;
         PROJECTILE_MAKETRIGGER(proj);
index ce39bca..d0125b5 100644 (file)
@@ -41,4 +41,7 @@
 
 #pragma noref 0
 
+#define use use1
+.void(entity this, entity actor, entity trigger) use;
+
 #endif
index 783ac03..e2668a5 100644 (file)
@@ -28,4 +28,7 @@ MACRO_END
 
 #pragma noref 0
 
+#define use use1
+.void(entity this, entity actor, entity trigger) use;
+
 #endif
index d9d4b62..f8260b5 100644 (file)
@@ -919,7 +919,7 @@ void trigger_warpzone_reconnect_use(entity this, entity actor, entity trigger)
 
 spawnfunc(trigger_warpzone_reconnect)
 {
-       this.use1 = trigger_warpzone_reconnect_use;
+       this.use = trigger_warpzone_reconnect_use;
 }
 
 spawnfunc(target_warpzone_reconnect)
index 218f219..352f0be 100644 (file)
@@ -96,7 +96,7 @@ spawnfunc(dynlight)
        if (!self.color)
                self.color = '1 1 1';
        self.lefty = self.light_lev;
-       self.use1 = dynlight_use;
+       self.use = dynlight_use;
        setsize (self, '0 0 0', '0 0 0');
        setorigin (self, self.origin);
        //self.pflags = PFLAGS_FULLDYNAMIC;
index 003b2ef..6623a07 100644 (file)
@@ -168,7 +168,7 @@ bool g_clientmodel_genericsendentity(entity this, entity to, int sf)
        if(self.geomtype) if(autocvar_physics_ode && checkextension("DP_PHYSICS_ODE")) self.movetype = MOVETYPE_PHYSICS; \
        if(!self.scale) self.scale = self.modelscale; \
        SetBrushEntityModel(); \
-       self.use1 = g_model_setcolormaptoactivator; \
+       self.use = g_model_setcolormaptoactivator; \
        InitializeEntity(self, g_model_dropbyspawnflags, INITPRIO_DROPTOFLOOR); \
        if(!self.solid) self.solid = (sol); else if(self.solid < 0) self.solid = SOLID_NOT;
 
@@ -176,7 +176,7 @@ bool g_clientmodel_genericsendentity(entity this, entity to, int sf)
        if(self.geomtype) if(autocvar_physics_ode && checkextension("DP_PHYSICS_ODE")) self.movetype = MOVETYPE_PHYSICS; \
        if(!self.scale) self.scale = self.modelscale; \
        SetBrushEntityModel(); \
-       self.use1 = g_clientmodel_use; \
+       self.use = g_clientmodel_use; \
        InitializeEntity(self, g_clientmodel_dropbyspawnflags, INITPRIO_DROPTOFLOOR); \
        if(!self.solid) self.solid = (sol); else if(self.solid < 0) self.solid = SOLID_NOT; \
        if(!self.bgmscriptsustain) self.bgmscriptsustain = 1; else if(self.bgmscriptsustain < 0) self.bgmscriptsustain = 0; \
index ab3c204..9b5a279 100644 (file)
@@ -969,8 +969,8 @@ void adaptor_think2touch()
 
 void adaptor_think2use()
 {SELFPARAM();
-       if(this.use1)
-       this.use1(this, NULL, NULL);
+       if(this.use)
+       this.use(this, NULL, NULL);
 }
 
 void adaptor_think2use_hittype_splash() // for timed projectile detonation
index cb6d558..7d2b31c 100644 (file)
@@ -361,7 +361,7 @@ spawnfunc(target_objective)
        if (!g_assault) { remove(this); return; }
 
        this.classname = "target_objective";
-       this.use1 = assault_objective_use;
+       this.use = assault_objective_use;
        this.reset = assault_objective_reset;
        this.reset(this);
        this.spawn_evalfunc = target_objective_spawn_evalfunc;
@@ -376,7 +376,7 @@ spawnfunc(target_objective_decrease)
        if(!self.dmg)
                self.dmg = 101;
 
-       self.use1 = assault_objective_decrease_use;
+       self.use = assault_objective_decrease_use;
        self.health = ASSAULT_VALUE_INACTIVE;
        self.max_health = ASSAULT_VALUE_INACTIVE;
        self.enemy = world;
@@ -420,7 +420,7 @@ spawnfunc(target_assault_roundend)
 
        self.winning = 0; // round not yet won by attackers
        self.classname = "target_assault_roundend";
-       self.use1 = target_assault_roundend_use;
+       self.use = target_assault_roundend_use;
        self.cnt = 0; // first round
        self.reset = target_assault_roundend_reset;
 }
@@ -431,7 +431,7 @@ spawnfunc(target_assault_roundstart)
 
        assault_attacker_team = NUM_TEAM_1;
        self.classname = "target_assault_roundstart";
-       self.use1 = assault_roundstart_use;
+       self.use = assault_roundstart_use;
        self.reset2 = assault_roundstart_use_self;
        InitializeEntity(self, assault_roundstart_use_this, INITPRIO_FINDTARGET);
 }
index 5a023a1..d24a076 100644 (file)
@@ -912,7 +912,7 @@ spawnfunc(trigger_race_checkpoint)
 
        EXACTTRIGGER_INIT;
 
-       self.use1 = checkpoint_use;
+       self.use = checkpoint_use;
        if (!(self.spawnflags & 1))
                self.touch = checkpoint_touch;
 
@@ -961,7 +961,7 @@ spawnfunc(target_checkpoint) // defrag entity
 
        EXACTTRIGGER_INIT;
 
-       self.use1 = checkpoint_use;
+       self.use = checkpoint_use;
        if (!(self.spawnflags & 1))
                self.touch = checkpoint_touch;
 
@@ -1117,7 +1117,7 @@ spawnfunc(trigger_race_penalty)
 
        EXACTTRIGGER_INIT;
 
-       self.use1 = penalty_use;
+       self.use = penalty_use;
        if (!(self.spawnflags & 1))
                self.touch = penalty_touch;
 
index 31e941a..711b15d 100644 (file)
@@ -102,7 +102,7 @@ void relocate_spawnpoint()
         }
     }
 
-    self.use1 = spawnpoint_use;
+    self.use = spawnpoint_use;
     self.think = spawnpoint_think;
     self.nextthink = time + 0.5 + random() * 2; // shouldn't need it for a little second
     self.team_saved = self.team;