You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// The engine only uses these data types.// Some custom engine may use others, but those engines are not supported.switch (fieldType)
{
case ENGINEFIELDTYPE::FIELD_FLOAT: return FIELD_FLOAT;
case ENGINEFIELDTYPE::FIELD_STRING: return FIELD_STRING;
case ENGINEFIELDTYPE::FIELD_EDICT: return FIELD_EDICT;
case ENGINEFIELDTYPE::FIELD_VECTOR: return FIELD_VECTOR;
case ENGINEFIELDTYPE::FIELD_INTEGER: return FIELD_INTEGER;
case ENGINEFIELDTYPE::FIELD_CHARACTER: return FIELD_CHARACTER;
case ENGINEFIELDTYPE::FIELD_TIME: return FIELD_TIME;
default: return FIELD_TYPECOUNT;
}
}
The affected parts of sv_save.c are:
SAVE_CLIENT structure. Xash3D saves viewentity as FIELD_SHORT. Maybe save it as FIELD_INTEGER?
Same for soundlist_t structure. Xash3D saves entity index to restore sounds as a FIELD_SHORT.
Same for decallist_t structure. Xash3D saves entity index to restore decals as a FIELD_SHORT.
Static entities save-restore. It uses FIELD_MODELNAME to store the model in messagenum field and uses FIELD_SHORT for skin and body. That might be overriden with custom SaveRead/WriteFields implementation. Or skipping save restore for static entities for these mods altogether (it's not like mods use static entities very often).
There is also gEntVarsDescription for FindEntityByString implementation. But it doesn't interact with the mod and directly peeks into entvars_t.
The text was updated successfully, but these errors were encountered:
FIELD_MODELNAME can be safely redefined into FIELD_STRING with manual model precache after restoring static entity.
Custom save/restore functions could also be used for soundlist_t and decallist_t structures. SAVE_CLIENT on the other hand, is shared with GoldSrc with only few fields unique to Xash3D.
The affected parts of sv_save.c are:
SAVE_CLIENT
structure. Xash3D saves viewentity as FIELD_SHORT. Maybe save it as FIELD_INTEGER?soundlist_t
structure. Xash3D saves entity index to restore sounds as aFIELD_SHORT
.decallist_t
structure. Xash3D saves entity index to restore decals as aFIELD_SHORT
.FIELD_MODELNAME
to store the model inmessagenum
field and usesFIELD_SHORT
forskin
andbody
. That might be overriden with customSaveRead/WriteFields
implementation. Or skipping save restore for static entities for these mods altogether (it's not like mods use static entities very often).FindEntityByString
implementation. But it doesn't interact with the mod and directly peeks into entvars_t.The text was updated successfully, but these errors were encountered: