diff --git a/GFX/HazmatOverlay.jpg b/GFX/HazmatOverlay.jpg new file mode 100644 index 000000000..86df35282 Binary files /dev/null and b/GFX/HazmatOverlay.jpg differ diff --git a/GFX/items/hazmat.b3d b/GFX/items/hazmat.b3d index 960a5093c..2d0872a5c 100644 Binary files a/GFX/items/hazmat.b3d and b/GFX/items/hazmat.b3d differ diff --git a/Items.bb b/Items.bb index 929803025..515d07851 100644 --- a/Items.bb +++ b/Items.bb @@ -203,9 +203,9 @@ Function InitItemTemplates() it = CreateItemTemplate("Bulky Ballistic Vest", "veryfinevest", "GFX\items\vest.x", "GFX\items\INVvest.jpg", "", 0.025,"GFX\items\Vest.png") it\sound = 2 - it = CreateItemTemplate("Hazmat Suit", "hazmatsuit", "GFX\items\hazmat.b3d", "GFX\items\INVhazmat.jpg", "", 0.013) + it = CreateItemTemplate("Hazmat Suit", "hazmatsuit", "GFX\items\hazmat.b3d", "GFX\items\INVhazmat.jpg", "", 0.013, "", "", 1) it\sound = 2 - it = CreateItemTemplate("Hazmat Suit", "hazmatsuit2", "GFX\items\hazmat.b3d", "GFX\items\INVhazmat.jpg", "", 0.013) + it = CreateItemTemplate("Hazmat Suit", "hazmatsuit2", "GFX\items\hazmat.b3d", "GFX\items\INVhazmat.jpg", "", 0.013, "", "", 1) it\sound = 2 it = CreateItemTemplate("Heavy Hazmat Suit", "hazmatsuit3", "GFX\items\hazmat.b3d", "GFX\items\INVhazmat.jpg", "", 0.013) it\sound = 2 @@ -773,8 +773,9 @@ Function DropItem(item.Items,playdropsound%=True) Select item\itemtemplate\tempname Case "gasmask", "supergasmask", "gasmask3" WearingGasMask = False - Case "hazmatsuit", "hazmatsuit2", "hazmatsuit3" - WearingHazmat = False + Case "hazmatsuit", "hazmatsuit2", "hazmatsuit3" + WearingHazmat = False + SetAnimTime(item\model, 4) Case "vest", "finevest" WearingVest = False Case "nvgoggles" diff --git a/Main.bb b/Main.bb index 0025cfcfe..11d4b27a0 100644 --- a/Main.bb +++ b/Main.bb @@ -2715,6 +2715,7 @@ DrawLoading(90, True) Global FogTexture%, Fog% Global GasMaskTexture%, GasMaskOverlay% +Global HazmatTexture%, HazmatOverlay% Global InfectTexture%, InfectOverlay% Global DarkTexture%, Dark% Global Collider%, Head% @@ -4499,21 +4500,31 @@ Function MouseLook() MoveMouse viewport_center_x, viewport_center_y EndIf - If WearingGasMask Or WearingHazmat Or Wearing1499 Then + If WearingGasMask Or Wearing1499 Then If Wearing714 = False Then - If WearingGasMask = 2 Or Wearing1499 = 2 Or WearingHazmat = 2 Then + If WearingGasMask = 2 Or Wearing1499 = 2 Then Stamina = Min(100, Stamina + (100.0-Stamina)*0.01*FPSfactor) EndIf EndIf - If WearingHazmat = 1 Then - Stamina = Min(60, Stamina) - EndIf - ShowEntity(GasMaskOverlay) Else HideEntity(GasMaskOverlay) End If + If WearingHazmat Then + If WearingHazmat = 1 Then + Stamina = Min(60.0, Stamina) + EndIf + If Wearing714 = False Then + If WearingHazmat = 2 Then + Stamina = Min(100, Stamina + (100.0-Stamina)*0.01*FPSfactor) + EndIf + EndIf + ShowEntity(HazmatOverlay) + Else + HideEntity(HazmatOverlay) + EndIf + If (Not WearingNightVision=0) Then ShowEntity(NVOverlay) If WearingNightVision=2 Then @@ -7937,6 +7948,16 @@ Function LoadEntities() MoveEntity(GasMaskOverlay, 0, 0, 1.0) HideEntity(GasMaskOverlay) + HazmatTexture = LoadTexture_Strict("GFX\HazmatOverlay.jpg", 1) + HazmatOverlay = CreateSprite(ark_blur_cam) + ScaleSprite(HazmatOverlay, 1.0, Float(GraphicHeight) / Float(GraphicWidth)) + EntityTexture(HazmatOverlay, HazmatTexture) + EntityBlend(HazmatOverlay, 2) + EntityFX(HazmatOverlay, 1) + EntityOrder(HazmatOverlay, -1003) + MoveEntity(HazmatOverlay, 0, 0, 1.0) + HideEntity(HazmatOverlay) + InfectTexture = LoadTexture_Strict("GFX\InfectOverlay.jpg", 1) InfectOverlay = CreateSprite(ark_blur_cam) ScaleSprite(InfectOverlay, Max(GraphicWidth / 1024.0, 1.0), Max(GraphicHeight / 1024.0 * 0.8, 0.8))