From 5af7ea425be73009248113aea2b96ae9179e5492 Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Sun, 5 Sep 2010 22:16:38 +0300 Subject: [PATCH] Finally fix the model issues! Might be done in a slightly hackish way, as I couldn't find anything better. You should now be able to play online and not see any more models lagging behind or not being animated. The issues were caused by attempting to animate the stomach model. Basically, if we animate the stomach model, that causes problems and lag. But there's no way to tell the animation code if that is the stomach model or the normal one, so the only alternative was not animating the model at all, which meant players were moving around like chess pieces. It seems that skipping an (useless) attempt to animate fixes it all however. --- data/qcsrc/server/cl_client.qc | 5 +---- data/qcsrc/server/cl_player.qc | 7 ++++++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/data/qcsrc/server/cl_client.qc b/data/qcsrc/server/cl_client.qc index aee74f09..11cf27c7 100644 --- a/data/qcsrc/server/cl_client.qc +++ b/data/qcsrc/server/cl_client.qc @@ -419,10 +419,7 @@ void setmodel_apply(string modelname) { precache_model(modelname); setmodel(self, modelname); // players have high precision - - // don't attempt to animate the stomach model - if not(substring(modelname, strlen(modelname) - 8 - 4, 8) == "_stomach") // - 4 is the extension - player_setupanimsformodel(); + player_setupanimsformodel(); } string setmodel_state() diff --git a/data/qcsrc/server/cl_player.qc b/data/qcsrc/server/cl_player.qc index 64230edc..a12a43bd 100644 --- a/data/qcsrc/server/cl_player.qc +++ b/data/qcsrc/server/cl_player.qc @@ -279,8 +279,13 @@ void player_setupanimsformodel() } else dprint("File ", animfilename, " not found, assuming legacy .zym model animation timings\n"); + + // the line below is disabled due to issues with the stomach model, which cannot be animated. + // customizeentityforclient cannot let this part of the code know whether it's the stomach model or normal + // player model we're using. Attempting to animate the stomach model causes BIG issues, and must not be allowed. + // reset animstate now - setanim(self, self.anim_idle, TRUE, FALSE, TRUE); + //setanim(self, self.anim_idle, TRUE, FALSE, TRUE); }; void player_anim (void) -- 2.39.2