Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Persistent Corpses plugin #91

Closed
wants to merge 2 commits into from
Closed

Update Persistent Corpses plugin #91

wants to merge 2 commits into from

Conversation

Miyoglow
Copy link
Contributor

@Miyoglow Miyoglow commented Jul 27, 2021

V1 - Shows limited character data (doesn't run PopulateImportantCharacterInfo hook etc...) on ragdoll.

V2 - Runs PopulateImportantCharacterInfo hook, shows all character info (probably)

Shows limited character data (doesn't run PopulateImportantCharacterInfo hook etc...) on ragdoll.
Comment on lines +168 to +172
-- remove player from netvars, we don't need to show any of the players data past death
entity:SetNetVar("player", nil)
-- we will show the characters data though
entity:SetNetVar("character", client:GetCharacter():GetID())

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're still accessing the player via GetPlayer so there's no need to add this. Changing fairly core net vars like player should be avoided anyway due to potential breakages of other plugins/schemas that rely on it

Comment on lines +238 to +246
local injure = panel:GetRow("injureText")

if (!injure) then
injure = panel:AddRowAfter("name", "injureText")
end

injure:SetText(L("injMajor"))
injure:SetBackgroundColor(Color(192, 57, 43))
injure:SizeToContents()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PopulateImportantCharacterInfo already does this?

@Miyoglow Miyoglow closed this Jul 28, 2021
@impulsh impulsh added the plugin-update Requesting a plugin to be updated label Jul 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin-update Requesting a plugin to be updated
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants