]> git.rm.cloudns.org Git - voretournament/voretournament.git/commitdiff
Fix the swallow model not showing to spectators when spectating a player. Also do...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 16 Jul 2011 23:46:35 +0000 (02:46 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 16 Jul 2011 23:46:35 +0000 (02:46 +0300)
data/qcsrc/server/vore.qc
docs/Release notes.txt

index cda4791ea5082acc2c1caa4b75aa3de45060cc94..484e689b88de13323bb59c2c61b17e6e2d61ea29 100644 (file)
@@ -204,9 +204,19 @@ void Vore_AutoDigest(entity e)
 }\r
 \r
 .entity swallow_model;\r
+float Vore_SwallowModel_CustomizeEntityForClient()\r
+{\r
+       // use the same system as the weapon model\r
+       self.viewmodelforclient = self.owner;\r
+       if(other.classname == "spectator")\r
+               if(other.enemy == self.owner)\r
+                       self.viewmodelforclient = other;\r
+       return TRUE;\r
+}\r
+\r
 void Vore_SwallowModel_Think()\r
 {\r
-       //update the position of the swallow model to match our swallow progress\r
+       // update the position of the swallow model to match our swallow progress\r
        float dist;\r
        dist = (-0.5 + self.owner.swallow_progress_prey) * cvar("g_vore_swallowmodel_range"); // the model is centered at 0.5 progress\r
        if(cvar("g_healthsize"))\r
@@ -232,18 +242,12 @@ void Vore_SwallowModel_Update(entity prey, entity pred)
        if(!prey.swallow_model)\r
        {\r
                prey.swallow_model = spawn();\r
-\r
                prey.swallow_model.movetype = MOVETYPE_FOLLOW;\r
                prey.swallow_model.solid = SOLID_NOT;\r
-\r
-               // apply the properties of the prey\r
-               prey.swallow_model.viewmodelforclient = prey; // use the same system as the weapon model\r
                //prey.swallow_model.effects |= EF_NOGUNBOB; // let it bob\r
                prey.swallow_model.effects |= EF_NODEPTHTEST; // don't hide behind walls\r
-               prey.swallow_model.colormap = prey.colormap; // pants and shirt color\r
-               prey.swallow_model.glowmod = prey.glowmod; // glow color\r
-\r
-               prey.swallow_model.owner = prey; // owned by the prey\r
+               prey.swallow_model.owner = prey;\r
+               prey.swallow_model.customizeentityforclient = Vore_SwallowModel_CustomizeEntityForClient;\r
                prey.swallow_model.think = Vore_SwallowModel_Think;\r
                prey.swallow_model.nextthink = time;\r
        }\r
@@ -259,6 +263,10 @@ void Vore_SwallowModel_Update(entity prey, entity pred)
                prey.swallow_model.scale = pred.scale / prey.scale; // player size difference\r
        if(prey.swallow_model.enemy != pred)\r
                prey.swallow_model.enemy = pred; // enemy is the predator\r
+       if(prey.swallow_model.colormap != pred.colormap)\r
+               prey.swallow_model.colormap = pred.colormap; // pants and shirt color\r
+       if(prey.swallow_model.glowmod != pred.glowmod)\r
+               prey.swallow_model.glowmod = pred.glowmod; // glow color\r
 }\r
 \r
 .entity pusher;\r
index c884af1f065cf63dfc5079f4f96e74b278729480..b71dc0f6501029934e852b35e33009ec4bd9a44f 100644 (file)
@@ -250,4 +250,6 @@ Bug fixes:
 \r
 - Fix the server attempting to attach the exterior weapon entity to stomach models. Should fix console warnings and the weapon model blinking for predators.\r
 \r
+- Fix the swallow model not showing to spectators when spectating a player. Also do some other fixes to the swallow models.\r
+\r
 - Disable GLSL color control by default. This MIGHT fix the white screen problem some people have been reporting.\r