mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-15 08:17:13 +00:00
test: a fractional friction amount of a trigger volume is sent as written
LWOPhantomPhysicsComponent::Deserialize (0x00c34db0) reads the effect amount as a 32-bit float, and trigger commands are run by the server only: the client has no parser of its own for "Friction,0.1". The amount stays a float. No live packet of one of the 18 volumes with 0.1 was found, so what live sent for them is not known. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -317,6 +317,13 @@ TEST_F(ReplicaConstructionTest, PhantomPhysicsVolumeEffectsAsLive) {
|
||||
EXPECT_EQ(effect.type, 4u);
|
||||
EXPECT_FALSE(effect.hasDistance);
|
||||
EXPECT_FALSE(effect.isDirectional);
|
||||
|
||||
// The amount is a float all the way: LWOPhantomPhysicsComponent::Deserialize (0x00c34db0) reads 32 bits into a
|
||||
// float, and trigger commands are run by the server only, so a fraction is kept as the zone file has it
|
||||
Entity lowFriction(1007, info);
|
||||
effect = ReadVolumeEffect(lowFriction, { "Friction", "0.1" });
|
||||
EXPECT_EQ(effect.type, 4u);
|
||||
EXPECT_EQ(effect.amount, 0.1f);
|
||||
}
|
||||
|
||||
// A construction (the volume coming into one player's range) doesn't use up an effect change the players already
|
||||
|
||||
Reference in New Issue
Block a user