mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2026-05-18 09:45:06 +08:00
Cutscene viewer enable/disable models
This commit is contained in:
+27
-1
@@ -467,6 +467,8 @@ namespace CodeWalker.World
|
|||||||
{
|
{
|
||||||
foreach (var obj in SceneObjects.Values)
|
foreach (var obj in SceneObjects.Values)
|
||||||
{
|
{
|
||||||
|
if (obj.Enabled == false) continue;
|
||||||
|
|
||||||
var pos = Position;
|
var pos = Position;
|
||||||
var rot = Rotation;
|
var rot = Rotation;
|
||||||
var animate = (obj.Ped != null) || (obj.Prop != null) || (obj.Vehicle != null);
|
var animate = (obj.Ped != null) || (obj.Prop != null) || (obj.Vehicle != null);
|
||||||
@@ -521,6 +523,8 @@ namespace CodeWalker.World
|
|||||||
{
|
{
|
||||||
foreach (var obj in SceneObjects.Values)
|
foreach (var obj in SceneObjects.Values)
|
||||||
{
|
{
|
||||||
|
if (obj.Enabled == false) continue;
|
||||||
|
|
||||||
if (obj.Ped != null)
|
if (obj.Ped != null)
|
||||||
{
|
{
|
||||||
renderer.RenderPed(obj.Ped);
|
renderer.RenderPed(obj.Ped);
|
||||||
@@ -677,6 +681,17 @@ namespace CodeWalker.World
|
|||||||
if (args == null)
|
if (args == null)
|
||||||
{ return; }
|
{ return; }
|
||||||
|
|
||||||
|
if (args.iObjectIdList == null) return;
|
||||||
|
|
||||||
|
foreach (var objid in args.iObjectIdList)
|
||||||
|
{
|
||||||
|
CutsceneObject obj = null;
|
||||||
|
SceneObjects.TryGetValue(objid, out obj);
|
||||||
|
if (obj != null)
|
||||||
|
{
|
||||||
|
obj.Enabled = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
private void LoadRayfireDes(CutEvent e)
|
private void LoadRayfireDes(CutEvent e)
|
||||||
{
|
{
|
||||||
@@ -733,6 +748,17 @@ namespace CodeWalker.World
|
|||||||
if (args == null)
|
if (args == null)
|
||||||
{ return; }
|
{ return; }
|
||||||
|
|
||||||
|
if (args.iObjectIdList == null) return;
|
||||||
|
|
||||||
|
foreach (var objid in args.iObjectIdList)
|
||||||
|
{
|
||||||
|
CutsceneObject obj = null;
|
||||||
|
SceneObjects.TryGetValue(objid, out obj);
|
||||||
|
if (obj != null)
|
||||||
|
{
|
||||||
|
obj.Enabled = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
private void UnloadRayfireDes(CutEvent e)
|
private void UnloadRayfireDes(CutEvent e)
|
||||||
{
|
{
|
||||||
@@ -1032,7 +1058,7 @@ namespace CodeWalker.World
|
|||||||
public MetaHash AnimHash { get; set; }
|
public MetaHash AnimHash { get; set; }
|
||||||
public ClipMapEntry AnimClip { get; set; }
|
public ClipMapEntry AnimClip { get; set; }
|
||||||
|
|
||||||
|
public bool Enabled { get; set; } = false;
|
||||||
|
|
||||||
|
|
||||||
public void Init(CutObject obj, GameFileCache gfc)
|
public void Init(CutObject obj, GameFileCache gfc)
|
||||||
|
|||||||
Reference in New Issue
Block a user