clientmodel: allow smoother scale (and more range, 1/256 to 256)
authorRudolf Polzer <divverent@alientrap.org>
Fri, 1 Oct 2010 05:52:05 +0000 (07:52 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Fri, 1 Oct 2010 05:52:05 +0000 (07:52 +0200)
qcsrc/client/wall.qc
qcsrc/server/g_models.qc

index 3aa140c6e87f28a70fa695f4386688fa645b7bce..7690c05f8d1f10006e898c4644f7f686732b53ca 100644 (file)
@@ -79,7 +79,7 @@ void Ent_Wall()
        {
                self.modelindex = ReadShort();
                self.solid = ReadByte();
-               self.scale = ReadByte() / 16.0;
+               self.scale = ReadShort() / 256.0;
                if(f & 0x20)
                {
                        self.mins_x = ReadCoord();
index 8a380484a2f9791af0f2d6a3ef7dd27bc541c9e9..0f0bba6e6d36fb335a5afa4485d6b2fd79e373f2 100644 (file)
@@ -88,7 +88,7 @@ float g_clientmodel_genericsendentity (entity to, float sf)
        {
                WriteShort(MSG_ENTITY, self.modelindex);
                WriteByte(MSG_ENTITY, self.solid);
-               WriteByte(MSG_ENTITY, floor(self.scale * 16));
+               WriteShort(MSG_ENTITY, floor(self.scale * 256));
                if(sf & 0x20)
                {
                        WriteCoord(MSG_ENTITY, self.mins_x);