]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
rename stuff to be less likely to conflict
authorRudolf Polzer <divverent@xonotic.org>
Tue, 15 Nov 2011 11:53:10 +0000 (12:53 +0100)
committerRudolf Polzer <divverent@xonotic.org>
Tue, 15 Nov 2011 11:53:10 +0000 (12:53 +0100)
qcsrc/csqcmodel/cl_model.qc
qcsrc/csqcmodel/cl_model.qh
qcsrc/csqcmodel/cl_player.qc
qcsrc/csqcmodel/common.qc
qcsrc/csqcmodel/settings.qh
qcsrc/csqcmodel/sv_model.qc

index ae17eedd3446d84dc8558b4d8364365da7b2a738..ad582543c7fb8476a3c516b47caf21a14048c748 100644 (file)
@@ -20,8 +20,6 @@
  * IN THE SOFTWARE.
  */
 
-// generic CSQC model code
-
 var float autocvar_cl_lerpanim_maxdelta_framegroups = 0.1;
 var float autocvar_cl_nolerp = 0;
 
@@ -34,24 +32,24 @@ var float autocvar_cl_nolerp = 0;
 void CSQCModel_InterpolateAnimation_PreNote(float sf)
 {
 #ifdef CSQCMODEL_HAVE_TWO_FRAMES
-       if(sf & PROPERTY_FRAME)
+       if(sf & CSQCMODEL_PROPERTY_FRAME)
        {
                self.frame3 = self.frame;
                self.frame3time = self.frame1time;
        }
-       if(sf & PROPERTY_FRAME2)
+       if(sf & CSQCMODEL_PROPERTY_FRAME2)
        {
                self.frame4 = self.frame2;
                self.frame4time = self.frame2time;
        }
-       if(sf & PROPERTY_LERPFRAC)
+       if(sf & CSQCMODEL_PROPERTY_LERPFRAC)
        {
                self.csqcmodel_lerpfrac2 = self.csqcmodel_lerpfrac;
                self.csqcmodel_lerpfrac2time = self.csqcmodel_lerpfractime;
                self.lerpfrac = self.csqcmodel_lerpfrac;
        }
 #else
-       if(sf & PROPERTY_FRAME)
+       if(sf & CSQCMODEL_PROPERTY_FRAME)
        {
                self.frame2 = self.frame;
                self.frame2time = self.frame1time;
@@ -62,21 +60,21 @@ void CSQCModel_InterpolateAnimation_PreNote(float sf)
 void CSQCModel_InterpolateAnimation_Note(float sf)
 {
 #ifdef CSQCMODEL_HAVE_TWO_FRAMES
-       if(sf & PROPERTY_FRAME)
+       if(sf & CSQCMODEL_PROPERTY_FRAME)
        {
                self.frame1time = time;
        }
-       if(sf & PROPERTY_FRAME2)
+       if(sf & CSQCMODEL_PROPERTY_FRAME2)
        {
                self.frame2time = time;
        }
-       if(sf & PROPERTY_LERPFRAC)
+       if(sf & CSQCMODEL_PROPERTY_LERPFRAC)
        {
                self.csqcmodel_lerpfrac = self.lerpfrac;
                self.csqcmodel_lerpfractime = time;
        }
 #else
-       if(sf & PROPERTY_FRAME)
+       if(sf & CSQCMODEL_PROPERTY_FRAME)
        {
                self.frame1time = time;
        }
@@ -168,20 +166,20 @@ void CSQCModel_Read()
        InterpolateOrigin_Undo();
        CSQCModel_InterpolateAnimation_PreNote(sf);
 
-#define PROPERTY(flag,r,w,f) \
+#define CSQCMODEL_PROPERTY(flag,r,w,f) \
        if(sf & flag) \
                self.f = r();
-#define PROPERTY_SCALED(flag,r,w,f,s,mi,ma) \
+#define CSQCMODEL_PROPERTY_SCALED(flag,r,w,f,s,mi,ma) \
        if(sf & flag) \
                self.f = r() / s;
        ALLPROPERTIES
-#undef PROPERTY_SCALED
-#undef PROPERTY
+#undef CSQCMODEL_PROPERTY_SCALED
+#undef CSQCMODEL_PROPERTY
 
-       if(sf & PROPERTY_MODELINDEX)
+       if(sf & CSQCMODEL_PROPERTY_MODELINDEX)
                setmodelindex(self, self.modelindex); // this retrieves the .model key and sets mins/maxs/absmin/absmax
 
-       if(sf & PROPERTY_TELEPORTED)
+       if(sf & CSQCMODEL_PROPERTY_TELEPORTED)
        {
                self.iflags |= IFLAG_TELEPORTED;
                self.csqcmodel_teleported = 1;
index e087ee670936d9da7566229242ec5428b90645d3..afd5f7d1ba9422b271aa2038c3c3425285b6708b 100644 (file)
@@ -20,6 +20,4 @@
  * IN THE SOFTWARE.
  */
 
-// generic CSQC model code
-
 void CSQCModel_Read();
index b059b14820a23d7306c76473f4068edd855670e6..f2e24d674e9f3e6425d38812492db8d866e7fc91 100644 (file)
@@ -24,9 +24,9 @@ var float autocvar_cl_predictionerrorcompensation = 0;
 var float autocvar_chase_active;
 var float autocvar_chase_back;
 
+// engine stuff
 .float pmove_flags;
 float pmove_onground; // weird engine flag we shouldn't really use but have to for now
-
 #define PMF_DUCKED 4
 #define PMF_TELEPORTED 16
 #define PMF_ONGROUND 32
index 036e09c0e68ae7f8eda74a6c91506a4f28f50371..6f48ba3432874323a59e17fa71058d49597b3039 100644 (file)
@@ -6,24 +6,24 @@
 .float frame2time;
 .float lerpfrac;
 
-#define PROPERTY_FRAME 32768
-#define PROPERTY_FRAME2 16384
-#define PROPERTY_LERPFRAC 8192
-#define PROPERTY_TELEPORTED 4096 // the "teleport bit" cancelling interpolation
-#define PROPERTY_MODELINDEX 2048
-#define PROPERTY_ORIGIN 1024
-#define PROPERTY_YAW 512
-#define PROPERTY_PITCHROLL 256
+#define CSQCMODEL_PROPERTY_FRAME 32768
+#define CSQCMODEL_PROPERTY_FRAME2 16384
+#define CSQCMODEL_PROPERTY_LERPFRAC 8192
+#define CSQCMODEL_PROPERTY_TELEPORTED 4096 // the "teleport bit" cancelling interpolation
+#define CSQCMODEL_PROPERTY_MODELINDEX 2048
+#define CSQCMODEL_PROPERTY_ORIGIN 1024
+#define CSQCMODEL_PROPERTY_YAW 512
+#define CSQCMODEL_PROPERTY_PITCHROLL 256
 
 #define ALLPROPERTIES_COMMON \
-       PROPERTY(PROPERTY_FRAME, ReadByte, WriteByte, frame) \
-       PROPERTY(PROPERTY_MODELINDEX, ReadShort, WriteShort, modelindex) \
-       PROPERTY(PROPERTY_ORIGIN, ReadCoord, WriteCoord, origin_x) \
-       PROPERTY(PROPERTY_ORIGIN, ReadCoord, WriteCoord, origin_y) \
-       PROPERTY(PROPERTY_ORIGIN, ReadCoord, WriteCoord, origin_z) \
-       PROPERTY(PROPERTY_PITCHROLL, ReadAngle, WriteAngle, angles_x) \
-       PROPERTY(PROPERTY_YAW, ReadAngle, WriteAngle, angles_y) \
-       PROPERTY(PROPERTY_PITCHROLL, ReadAngle, WriteAngle, angles_z) \
+       CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_FRAME, ReadByte, WriteByte, frame) \
+       CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_MODELINDEX, ReadShort, WriteShort, modelindex) \
+       CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_ORIGIN, ReadCoord, WriteCoord, origin_x) \
+       CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_ORIGIN, ReadCoord, WriteCoord, origin_y) \
+       CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_ORIGIN, ReadCoord, WriteCoord, origin_z) \
+       CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_PITCHROLL, ReadAngle, WriteAngle, angles_x) \
+       CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_YAW, ReadAngle, WriteAngle, angles_y) \
+       CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_PITCHROLL, ReadAngle, WriteAngle, angles_z) \
        CSQCMODEL_EXTRAPROPERTIES
 
 #ifdef CSQCMODEL_HAVE_TWO_FRAMES
@@ -34,8 +34,8 @@
 .float frame4time;
 .float lerpfrac4;
 #define ALLPROPERTIES ALLPROPERTIES_COMMON \
-       PROPERTY(PROPERTY_FRAME2, ReadByte, WriteByte, frame2) \
-       PROPERTY_SCALED(PROPERTY_LERPFRAC, ReadByte, WriteByte, lerpfrac, 255, 0, 255)
+       CSQCMODEL_PROPERTY(CSQCMODEL_PROPERTY_FRAME2, ReadByte, WriteByte, frame2) \
+       CSQCMODEL_PROPERTY_SCALED(CSQCMODEL_PROPERTY_LERPFRAC, ReadByte, WriteByte, lerpfrac, 255, 0, 255)
 #else
 #define ALLPROPERTIES ALLPROPERTIES_COMMON
 #endif
index bef9fcc78a67e3bb38b66b2d350b55410e42c4ae..6d5ff53fdc476cf764bb243fd82051f7b596fd1f 100644 (file)
@@ -6,10 +6,10 @@
 
 // add properties you want networked to CSQC here
 #define CSQCMODEL_EXTRAPROPERTIES \
-       PROPERTY(1, ReadByte, WriteByte, skin) \
-       PROPERTY(2, ReadShort, WriteShort, colormap) \
-       PROPERTY(4, ReadInt24_t, WriteInt24_t, effects) \
-       PROPERTY_SCALED(8, ReadByte, WriteByte, alpha, 255, 0, 255)
+       CSQCMODEL_PROPERTY(1, ReadByte, WriteByte, skin) \
+       CSQCMODEL_PROPERTY(2, ReadShort, WriteShort, colormap) \
+       CSQCMODEL_PROPERTY(4, ReadInt24_t, WriteInt24_t, effects) \
+       CSQCMODEL_PROPERTY_SCALED(8, ReadByte, WriteByte, alpha, 255, 0, 255)
 
 // add hook function calls here
 #define CSQCMODEL_HOOK_PREUPDATE
index 59b8b284b84eb5acd076df02672e6b2500c6bcba..b6952f02772905acb190dd1fdd3e823968263de5 100644 (file)
 
 // generic CSQC model code
 
-#define PROPERTY(flag,r,w,f) \
+#define CSQCMODEL_PROPERTY(flag,r,w,f) \
        .float csqcmodel_##f;
-#define PROPERTY_SCALED(flag,r,w,f,s,mi,ma) PROPERTY(flag,r,w,f)
+#define CSQCMODEL_PROPERTY_SCALED(flag,r,w,f,s,mi,ma) CSQCMODEL_PROPERTY(flag,r,w,f)
        ALLPROPERTIES
-#undef PROPERTY_SCALED
-#undef PROPERTY
+#undef CSQCMODEL_PROPERTY_SCALED
+#undef CSQCMODEL_PROPERTY
 
 float CSQCModel_Send(entity to, float sf)
 {
        WriteByte(MSG_ENTITY, ENT_CLIENT_MODEL);
        WriteShort(MSG_ENTITY, sf);
 
-#define PROPERTY(flag,r,w,f) \
+#define CSQCMODEL_PROPERTY(flag,r,w,f) \
        if(sf & flag) \
        { \
                w(MSG_ENTITY, self.csqcmodel_##f); \
        }
-#define PROPERTY_SCALED(flag,r,w,f,s,mi,ma) PROPERTY(flag,r,w,f)
+#define CSQCMODEL_PROPERTY_SCALED(flag,r,w,f,s,mi,ma) CSQCMODEL_PROPERTY(flag,r,w,f)
        ALLPROPERTIES
-#undef PROPERTY_SCALED
-#undef PROPERTY
+#undef CSQCMODEL_PROPERTY_SCALED
+#undef CSQCMODEL_PROPERTY
 
        return TRUE;
 }
@@ -53,24 +53,24 @@ void CSQCModel_CheckUpdate()
 
        if(self.effects & EF_RESTARTANIM_BIT)
        {
-               self.SendFlags |= PROPERTY_FRAME | PROPERTY_FRAME2; // full anim resend please
+               self.SendFlags |= CSQCMODEL_PROPERTY_FRAME | CSQCMODEL_PROPERTY_FRAME2; // full anim resend please
                self.effects &~= EF_RESTARTANIM_BIT;
        }
 
        if(self.effects & EF_TELEPORT_BIT)
        {
-               self.SendFlags |= PROPERTY_TELEPORTED; // no interpolation please
+               self.SendFlags |= CSQCMODEL_PROPERTY_TELEPORTED; // no interpolation please
                self.effects &~= EF_TELEPORT_BIT;
        }
 
-#define PROPERTY(flag,r,w,f) \
+#define CSQCMODEL_PROPERTY(flag,r,w,f) \
        tmp = self.f; \
        if(tmp != self.csqcmodel_##f) \
        { \
                self.csqcmodel_##f = tmp; \
                self.SendFlags |= flag; \
        }
-#define PROPERTY_SCALED(flag,r,w,f,s,mi,ma) \
+#define CSQCMODEL_PROPERTY_SCALED(flag,r,w,f,s,mi,ma) \
        tmp = bound(mi, s * self.f, ma); \
        if(tmp != self.csqcmodel_##f) \
        { \
@@ -78,8 +78,8 @@ void CSQCModel_CheckUpdate()
                self.SendFlags |= flag; \
        }
        ALLPROPERTIES
-#undef PROPERTY_SCALED
-#undef PROPERTY
+#undef CSQCMODEL_PROPERTY_SCALED
+#undef CSQCMODEL_PROPERTY
 }
 
 void CSQCModel_LinkEntity()