Cataclysm-TISH-team / Cataclysm-TISH

Cataclysm: There Is Still Hope - a fork of Cataclysm: Dark Days Ahead by CleverRaven.
Other
83 stars 5 forks source link

Try to infect player only on feral/NPC cough #68

Closed Night-Pryanik closed 1 year ago

Night-Pryanik commented 1 year ago

Summary

None

Purpose of change

Resolve possible performance issues.

Describe the solution

Applied @LazyWizard's suggestion and made checks for getting sick only roll when NPC or feral with fake_common_cold effect coughs.

Also, while I'm here, I slightly buffed environmental factor when determining player's chance to get sick as I felt that wearing no mouth protection at all and wearing a gas mask has almost the same effect when calculating this chance.

Describe alternatives you've considered

None.

Testing

Built a cage for me and NPC with the effect. Waited for NPC to cough on me.

Additional context

None.