[Server] Blood/Gore (Performance issue fixed)

Author Topic: [Server] Blood/Gore (Performance issue fixed)  (Read 15012 times)


Update time

- Now supports ray-casting weapons, or basically any item or weapon that does damage. This is done by using Armor::Damage. If the %position supplied in this function isn't accurate (non-defined, equal to the origin, or 3tu * player scale away from hack position) it will just use the player's position offset by a random value on the x y and z axis. Since it's impossible to determine which direction the damage came from, it will just spray blood in the general downward direction with a minor random spread. Dismemberment is determined using $Pref::RBloodMod::DismemberDamage and nothing else.

- Blood effect on fall damage

Please note that you can still use RBloodSimulate to patch specific weapon packs to work correctly, I highly recommend that you do (in order to get full functionality), and the new method should not interfere. A lot of weapon packs use Armor::Damage for some interesting shenanigans, so consider this a beta lol.

https://leopard.hosting/dl/cwcue/Server_RBlood.zip
« Last Edit: March 29, 2018, 04:41:11 AM by Rally »

Is there any way to disable the blood on the players?

Is there any way to disable the blood on the players?

I'm guessing you mean like the player turning red when exposed to blood? If so, paste this in console:
Code: [Select]
$Pref::RBloodMod::LimbReddening = false;



%sourceObject being a projectile is the best case scenario. If it’s not, I’m left guessing, there’s no way to determine vector or details about the projectile like whether or not it’s supposed to be melee or a gun. The assumptions just pile up thereafter. At most I’d be able to implement partial-half assed support for raycasting weapon packs, but even then, there’s no guarantee it will work unless the creator of the weapon pack has called player.damage with specific arguments that actually support my blood mod.

For example, Conan’s dueling weapons call armor::damage with an undefined position argument. There’s nothing wrong with this, because blockland doesn’t care and there’s no real reason he needs to care. But when it gets to my mod, the system is going to plug in “0 0 0” as the hit position thinking it’s where the collision between the player and the damage source happened, meaning you’d see particles spawning at the origin and not where you hit the player, and it would also only ever bloody your feet, since the origin is on the ground.

Compare all these weird hacks and work arounds to adding a single line of code in somewhere and fixing it entirely. You could probably even just package it as a new add-on.
if you need i can pass the hit location to armor::damage, i just never noticed/bothered. it isnt that hard.

also %sourceobject can be a brick, a player (in the case of Self Delete, for example), a vehicle i think (or maybe just the player?), so yeah, you cant depend on that being a certain type. you can definitely check though with %sourceobject.getClassName()

if you need i can pass the hit location to armor::damage, i just never noticed/bothered. it isnt that hard.

It's not a huge problem since the last update now works with your weapon pack, so I wouldn't want you to have to do an update just for this mod.


well now that the thread is bumped i'll just share this firing squad i made to test the mod and the results were pretty cool

Why do people explode on death? I don't have any mods that cause gib deaths, only mod i got is the old blood/gore explosion on death mod, but that's disabled.

not as a dismissal but genuinely asking how many gore mods are we on at this point

Why do people explode on death? I don't have any mods that cause gib deaths, only mod i got is the old blood/gore explosion on death mod, but that's disabled.

In this mod people gib on death when they are killed by radius damage above a certain damage threshold (70 default) and are close to the center of the explosion. Might be a mod conflict or something. Try doing a trace and see what packages are active when you kill someone

After some non-stop death in this madworld map I made, my FPS started dropping. I noticed that the bleeding effects weren't deleting and just kept falling through bricks infinitely. You think this is the quirk? Other than that, this is awesome of course. :D

After some non-stop death in this madworld map I made, my FPS started dropping. I noticed that the bleeding effects weren't deleting and just kept falling through bricks infinitely. You think this is the quirk? Other than that, this is awesome of course. :D

Oh wow, that would explain it haha. Can you post a picture here?