Metastruct / Metastruct/outfitter

Proposal to support prophunt

Open
#117 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Lua
Stars
20
Forks
12
PR merge metrics
No merged PRs in 30d

Description

Currently i use this hook to fix outfitter on prophunt. Prophunt gamemode: OBJHunt, may be incompatible with PHX or original PH with it's team names, i don't know
server:

hook.Add( "PlayerSpawn", "Fix Outfitter", function ( ply )
    if ply:Team() == TEAM_PROPS then
        net.Start("PH_strip_outfit")
        net.Send(ply)
    elseif ply:Team() == TEAM_HUNTERS then
        net.Start("PH_return_outfit")
        net.Send(ply)
    end
end
)

client:

net.Receive("PH_strip_outfit", function()
    local ply = LocalPlayer()
    ply:EnforceModel(false)
end)

net.Receive("PH_return_outfit", function()
    local ply = LocalPlayer()
    ply:EnforceModel(ply.outfitter_mdl)
end)

This fixes an issue where the prop-player's camera view would start to twitch.
The problem with the model visibility for the prop player is not present from the start.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the PlayerSpawn hook and the PH_strip_outfit and PH_return_outfit network handlers shown in the issue, then trace how prophunt identifies prop players and hunters. Reproduce the camera twitch with OBJHunt and compare the model-visibility behavior from the start of the game. Done means prophunt is supported without the workaround and the affected camera and model behavior no longer occurs.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
game-dev
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.