X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fcommon%2Fcsqcmodel_settings.qh;h=7c5a218b21f15e34ba6ba43ee0d13b4a2b0a801f;hp=da2661b9c549e5d2b1f845c1cac73b2d901fdc62;hb=991de5e6922cd3c283de56c3249624f0f1bfe767;hpb=efe14f5b34aa59b5d5eff7b0ae35eb69d4c3eacf diff --git a/qcsrc/common/csqcmodel_settings.qh b/qcsrc/common/csqcmodel_settings.qh index da2661b9c5..7c5a218b21 100644 --- a/qcsrc/common/csqcmodel_settings.qh +++ b/qcsrc/common/csqcmodel_settings.qh @@ -1,5 +1,4 @@ -#ifndef CSQCMODEL_SETTINGS_H -#define CSQCMODEL_SETTINGS_H +#pragma once // define this if svqc code wants to use .frame2 and .lerpfrac //#define CSQCMODEL_HAVE_TWO_FRAMES @@ -19,21 +18,14 @@ # define TAG_VIEWLOC_NAME tag_networkviewloc # define TAG_VIEWLOC_TYPE int .float tag_networkviewloc; - -# define MOVETYPE_NAME move_movetype #else # define TAG_ENTITY_NAME tag_entity # define TAG_ENTITY_TYPE entity # define TAG_VIEWLOC_NAME viewloc # define TAG_VIEWLOC_TYPE entity - -# define MOVETYPE_NAME movetype #endif -// new fields -.vector v_angle; - // add properties you want networked to CSQC here #define CSQCMODEL_EXTRAPROPERTIES \ CSQCMODEL_PROPERTY(BIT(0), int, ReadShort, WriteShort, colormap) \ @@ -48,10 +40,10 @@ CSQCMODEL_PROPERTY_SCALED(BIT(8), float, ReadByte, WriteByte, glowmod_x, 254, -1, 254) \ CSQCMODEL_PROPERTY_SCALED(BIT(8), float, ReadByte, WriteByte, glowmod_y, 254, -1, 254) \ CSQCMODEL_PROPERTY_SCALED(BIT(8), float, ReadByte, WriteByte, glowmod_z, 254, -1, 254) \ - CSQCMODEL_PROPERTY_SCALED(BIT(8), float, ReadByte, WriteByte, colormod_x, 254, -1, 254) \ - CSQCMODEL_PROPERTY_SCALED(BIT(8), float, ReadByte, WriteByte, colormod_y, 254, -1, 254) \ - CSQCMODEL_PROPERTY_SCALED(BIT(8), float, ReadByte, WriteByte, colormod_z, 254, -1, 254) \ CSQCMODEL_ENDIF \ + CSQCMODEL_PROPERTY_SCALED(BIT(8), float, ReadByte, WriteByte, colormod_x, 16, 0, 255) \ + CSQCMODEL_PROPERTY_SCALED(BIT(8), float, ReadByte, WriteByte, colormod_y, 16, 0, 255) \ + CSQCMODEL_PROPERTY_SCALED(BIT(8), float, ReadByte, WriteByte, colormod_z, 16, 0, 255) \ CSQCMODEL_IF(isplayer) \ CSQCMODEL_PROPERTY(BIT(7), int, ReadByte, WriteByte, anim_state) \ CSQCMODEL_PROPERTY(BIT(7), float, ReadApproxPastTime, WriteApproxPastTime, anim_time) \ @@ -64,16 +56,16 @@ CSQCMODEL_ENDIF \ CSQCMODEL_PROPERTY(BIT(10), float, ReadAngle, WriteAngle, v_angle_x) \ CSQCMODEL_PROPERTY(BIT(11), int, ReadByte, WriteByte, traileffect) \ - CSQCMODEL_PROPERTY_SCALED(BIT(12), float, ReadByte, WriteByte, scale, 16, 0, 255) \ + CSQCMODEL_PROPERTY(BIT(12), float, ReadCoord, WriteCoord, scale) \ CSQCMODEL_PROPERTY(BIT(13), int, ReadInt24_t, WriteInt24_t, dphitcontentsmask) \ CSQCMODEL_PROPERTY(BIT(14), TAG_VIEWLOC_TYPE, ReadShort, WriteEntity, TAG_VIEWLOC_NAME) \ - CSQCMODEL_PROPERTY(BIT(15), int, ReadByte, WriteByte, multijump_count) \ - CSQCMODEL_PROPERTY(BIT(16), int, ReadByte, WriteByte, MOVETYPE_NAME) -// TODO get rid of colormod/glowmod here, find good solution for vortex charge glowmod hack; also get rid of some useless properties on non-players that only exist for CopyBody + CSQCMODEL_PROPERTY(BIT(16), int, ReadByte, WriteByte, multijump_count) \ + CSQCMODEL_PROPERTY(BIT(16), int, ReadByte, WriteByte, move_movetype) +// TODO get rid of colormod/glowmod here; also get rid of some useless properties on non-players that only exist for CopyBody // add hook function calls here #define CSQCPLAYER_HOOK_POSTCAMERASETUP() \ - CSQCPlayer_SetViewLocation() + viewloc_SetViewLocation() // force updates of player entities this frequently (per second) even if unchanged #ifndef CSQCPLAYER_FORCE_UPDATES @@ -94,4 +86,3 @@ #endif #define CSQCMODEL_EF_RESPAWNGHOST EF_SELECTABLE -#endif