|
|
@ -16,7 +16,7 @@ public partial class GameModule |
|
|
{ |
|
|
{ |
|
|
if (string.IsNullOrEmpty(modelName)) |
|
|
if (string.IsNullOrEmpty(modelName)) |
|
|
{ |
|
|
{ |
|
|
uq.GameState.ClearEntityModel(entityNum); |
|
|
|
|
|
|
|
|
uq.GameState.GetEntity(entityNum)?.ClearModel(); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -35,14 +35,14 @@ public partial class GameModule |
|
|
if (modelName.EndsWith(".bsp")) |
|
|
if (modelName.EndsWith(".bsp")) |
|
|
{ |
|
|
{ |
|
|
// TODO: non-world brush model
|
|
|
// TODO: non-world brush model
|
|
|
uq.GameState.ClearEntityModel(entityNum); |
|
|
|
|
|
|
|
|
uq.GameState.GetEntity(entityNum)?.ClearModel(); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (modelName.EndsWith(".spr")) |
|
|
if (modelName.EndsWith(".spr")) |
|
|
{ |
|
|
{ |
|
|
// TODO: sprite
|
|
|
// TODO: sprite
|
|
|
uq.GameState.ClearEntityModel(entityNum); |
|
|
|
|
|
|
|
|
uq.GameState.GetEntity(entityNum)?.ClearModel(); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -51,7 +51,7 @@ public partial class GameModule |
|
|
|
|
|
|
|
|
private void SetEntityTransform(int entityNum, QVec3 origin, QVec3 angles) |
|
|
private void SetEntityTransform(int entityNum, QVec3 origin, QVec3 angles) |
|
|
{ |
|
|
{ |
|
|
uq.GameState.SetEntityTransform(entityNum, origin.ToUnityPosition(), angles.ToUnityRotation()); |
|
|
|
|
|
|
|
|
uq.GameState.GetEntity(entityNum)?.SetTransform(origin.ToUnityPosition(), angles.ToUnityRotation()); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private void RemoveEntity(int entityNum) |
|
|
private void RemoveEntity(int entityNum) |
|
|
@ -61,6 +61,6 @@ public partial class GameModule |
|
|
|
|
|
|
|
|
private void UpdateEntityAnimation(int entityNum, float frameNum) |
|
|
private void UpdateEntityAnimation(int entityNum, float frameNum) |
|
|
{ |
|
|
{ |
|
|
uq.GameState.UpdateEntityAnimation(entityNum, frameNum); |
|
|
|
|
|
|
|
|
uq.GameState.GetEntity(entityNum)?.UpdateAnimation(frameNum); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |