Skip to content

Server crashes on barrett kill #1084

@DerScherenmann

Description

@DerScherenmann

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    crashThe mod crashes the game

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions