Simple Parts Pack for Flan's Mod

Simple Parts Pack for Flan's Mod

903k Downloads

Server crashes on barrett kill

DerScherenmann opened this issue ยท 1 comments

commented

To Reproduce
Steps to reproduce the crash:

  1. Get two clients on a server with FlansMod running
  2. Give Player 1 a Barrett
  3. Shoot Player 2 with it
  4. Server crashes

Temporary Fix

comment out this paragraph in com/flansmod/common/guns/ShotHandler,java

// Check teams
			
			if (optionalPlayer.isPresent())
			{
				EntityPlayerMP player = optionalPlayer.get();
				
				if(FlansModClient.teamInfo != null)
				{
					Team shooterTeam = FlansModClient.teamInfo.getTeam(player);
					Team victimTeam = FlansModClient.teamInfo.getTeam(playerHit.hitbox.player);
					if(shooterTeam == null || shooterTeam != victimTeam)
					{
						FlansMod.getPacketHandler().sendTo(new PacketHitMarker(), player);
					}
				}
				else // No teams mod, just add marker
				{
					FlansMod.getPacketHandler().sendTo(new PacketHitMarker(), player);
				}
			}

Screenshots

Versions (please complete the following information):

  • Forge: 1.12.2-forge1.12.2-14.23.5.2768
  • Flan's Mod: latest git clone 23/07/2019

Additional context

https://gist.github.com/broesel233/074c937c53071fca82785de9e47b9308

commented

@Liruxo looks like this may be an issue spouting from your PR, I haven't double checked yet though.