Page MenuHomeFeedback Tracker

Cannot spawn attachments on player while in water
Assigned, NormalPublic

Description

I have a spawn select mod and sometimes the player can spawn in water while selecting his spawn.

My system allows admins to setup loadouts players should spawn with, but for some reason, this will not properly work when the player spawned in water while selecting his spawn.

This bug only applies to attachments. If the player already has clothing and I try to spawn items in there, that will work fine, but when I strip all clothes form the player and want to spawn custom clothing, this will break

Details

Severity
Block
Resolution
Open
Reproducibility
Always
Operating System
Windows 7
Category
General
Steps To Reproduce

Spawn your player in water at 0,0,0 or somewhere else in the ocean and try to use player.GetInventory().CreateInInventory("CargoPants_Black"); The FindFirstFreeLocationForNewEntity method called in the CreateInInventory method for some reason fails when the player is in water. When not, this will return true and work just fine

Event Timeline

LBmaster added a comment.EditedTue, Dec 10, 11:55 AM

Also a workaround I found out, which I will be using until this is fixed, is:

if (GetCommand_Swim()) {
	GetCommand_Swim().StopSwimming();
	m_Swimming.m_bWasSwimming = false;
	StartCommand_Move();
}
// Then spawn Items will work for the next frame until the player automatically starts swimming again
Geez changed the task status from New to Assigned.Tue, Dec 10, 12:07 PM

как создать задачу ?