mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 06:19:22 +00:00
add spawn height offset
This commit is contained in:
parent
a202f6f987
commit
652348157a
1 changed files with 6 additions and 1 deletions
|
@ -143,7 +143,12 @@ public class PropUndoButton : MelonMod
|
||||||
|
|
||||||
// Add the spawned prop to the history of deleted props
|
// Add the spawned prop to the history of deleted props
|
||||||
if (deletedProps.Count >= redoHistoryLimit) deletedProps.RemoveAt(0); // Remove the oldest item
|
if (deletedProps.Count >= redoHistoryLimit) deletedProps.RemoveAt(0); // Remove the oldest item
|
||||||
DeletedProp deletedProp = new DeletedProp(propData.ObjectId, propData.Spawnable.transform.position, propData.Spawnable.transform.rotation);
|
|
||||||
|
// offset spawn height so game can account for it later
|
||||||
|
Vector3 position = propData.Spawnable.transform.position;
|
||||||
|
position.y -= propData.Spawnable.spawnHeight;
|
||||||
|
|
||||||
|
DeletedProp deletedProp = new DeletedProp(propData.ObjectId, position, propData.Spawnable.transform.rotation);
|
||||||
deletedProps.Add(deletedProp);
|
deletedProps.Add(deletedProp);
|
||||||
|
|
||||||
PlayAudioModule(sfx_undo);
|
PlayAudioModule(sfx_undo);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue