mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-19 18:25:27 +00:00
fix: trigger volume effects go out as live sent them
A trigger's SetPhysicsVolumeEffect is "type,amount,x,y,z,use distance,
min,max". In live phantom physics constructions:
- the direction has the amount as its length: "Push,50,0.91,-0.34,-0.22"
went out as 45.68, -17.07, -11.04. DLU multiplied the arguments as
they were, so a direction that isn't a unit vector pushed harder;
- a zero direction ("Repulse,150,0,0,0,true,25,100") is no direction;
- the distances go out when use distance is "true" ("true,150,175" as 1
and 175, "true,20,50" as 1 and 50) and not when it is "1"
("Push,40.0,0,1,0,1,20,50"). DLU never wrote them.
LWOPhantomPhysicsComponent::Deserialize (0x00c34db0) reads the two
distances as floats and keeps the least of the min and 1, and a max of at
least that.
Seven arguments no longer read an eighth.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -120,14 +120,16 @@ public:
|
||||
void SpawnVertices() const;
|
||||
|
||||
/**
|
||||
* Legacy stuff no clue what this does
|
||||
* The distances the effect scales between; written only once one of them is set.
|
||||
* LWOPhantomPhysicsComponent::Deserialize (0x00c34db0) keeps the least of the min and 1, and a max of at least that.
|
||||
*/
|
||||
void SetMin(uint32_t min);
|
||||
void SetMin(float min);
|
||||
void SetMax(float max);
|
||||
|
||||
/**
|
||||
* Legacy stuff no clue what this does
|
||||
* A trigger's SetPhysicsVolumeEffect: type, amount, direction x, y, z, use distance, min, max
|
||||
*/
|
||||
void SetMax(uint32_t max);
|
||||
void SetVolumeEffect(std::vector<std::string> args);
|
||||
|
||||
private:
|
||||
bool OnGetObjectReportInfo(GameMessages::GetObjectReportInfo& reportInfo);
|
||||
@@ -158,8 +160,8 @@ private:
|
||||
float m_DirectionalMultiplier;
|
||||
|
||||
bool m_MinMax;
|
||||
uint32_t m_Min;
|
||||
uint32_t m_Max;
|
||||
float m_Min;
|
||||
float m_Max;
|
||||
|
||||
/**
|
||||
* Whether or not this physics object is pointed in some direction
|
||||
|
||||
Reference in New Issue
Block a user