Jump to content

Nightmare Creatures use wrong HostileToPlayerTest function


hoxi
  • Pending
local function CLIENT_ShadowSubmissive_HostileToPlayerTest(inst, player)
	if player:HasTag("shadowdominance") then
		return false
	end
	local combat = inst.replica.combat
	if combat ~= nil and combat:GetTarget() == player then
		return true
	end
	local sanity = player.replica.sanity
	if sanity ~= nil and sanity:IsCrazy() then
		return true
	end
	return false
end

Given the name and everything, this seems to be copy-pasted, and this would be fine given how similar nightmare and shadow creatures are, but there's one problem. Nightmare creatures attack regardless of sanity and players can always attack them. It'd make more sense if the function looked like this instead.

local function CLIENT_NightmareSubmissive_HostileToPlayerTest(inst, player)
	if player:HasTag("shadowdominance") then
		return false
	end
	return true
end

This would allow players to attack them without having to force attack, be targeted by them, or be insane, which only makes sense to be the case with shadow creatures.


Steps to Reproduce
  1. Make a nightmare creature target another player, or even Bernie.
  2. Attempt to attack the nightmare creature by pressing attack.
  3. Notice how it won't work unless you're the target or your sanity is low enough to aggro shadow creatures, despite them being able to aggro at any sanity.



User Feedback


There are no comments to display.



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
  • Create New...