Skip to content

Commit

Permalink
Add 64-bit check
Browse files Browse the repository at this point in the history
  • Loading branch information
DrVrej committed Jan 29, 2023
1 parent 4e400e8 commit 18bf97d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
13 changes: 7 additions & 6 deletions lua/autorun/vj_base_autorun.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
--------------------------------------------------*/
if CLIENT then print("Loading VJ Base (Client)...") else print("Loading VJ Base (Server)...") end

VJBASE_VERSION = "2.16.0"
VJBASE_VERSION = "2.16.0b"

-- Shared --
AddCSLuaFile("autorun/vj_menu_spawninfo.lua")
Expand Down Expand Up @@ -84,13 +84,14 @@ end)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------ Outdated GMod Version Check ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if SERVER && !isfunction(FindMetaTable("NPC").AutoMovement) then
if SERVER && !isfunction(FindMetaTable("NPC").SetSurroundingBoundsType) then
timer.Simple(1, function()
if !VJBASE_GMOD_OUTDATED then
VJBASE_GMOD_OUTDATED = true
timer.Create("VJ_WARN_GModOutdated", 2, 0, function()
if !VJBASE_ERROR_GAME_OUTDATED then
VJBASE_ERROR_GAME_OUTDATED = true
timer.Create("VJBASE_ERROR_GAME_OUTDATED", 2, 1, function()
PrintMessage(HUD_PRINTTALK, "--- Outdated version of Garry's Mod detected! ---")
PrintMessage(HUD_PRINTTALK, "Either the game is pirated or it's on Chromium branch!")
PrintMessage(HUD_PRINTTALK, "Major parts of VJ Base AI are now disabled! Expect errors & AI issues!")
PrintMessage(HUD_PRINTTALK, "REASON: Game is running on 64-bit or Chromium or is pirated!")
end)
end
end)
Expand Down
4 changes: 3 additions & 1 deletion lua/entities/npc_vj_creature_base/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1103,7 +1103,9 @@ function ENT:Initialize()
self:SetMaxYawSpeed(self.TurningSpeed)
ConvarsOnInit(self)
self:DoChangeMovementType()
self:SetSurroundingBoundsType(BOUNDS_HITBOXES) // BOUNDS_COLLISION
if self.SetSurroundingBoundsType then -- !!!!!!!!!!!!!! Outdated GMod Compatibility! !!!!!!!!!!!!!!
self:SetSurroundingBoundsType(BOUNDS_HITBOXES) // BOUNDS_COLLISION
end
self.ExtraCorpsesToRemove_Transition = {}
self.VJ_AddCertainEntityAsEnemy = {}
self.VJ_AddCertainEntityAsFriendly = {}
Expand Down
4 changes: 3 additions & 1 deletion lua/entities/npc_vj_human_base/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1107,7 +1107,9 @@ function ENT:Initialize()
self:SetMaxYawSpeed(self.TurningSpeed)
ConvarsOnInit(self)
self:DoChangeMovementType()
self:SetSurroundingBoundsType(BOUNDS_HITBOXES) // BOUNDS_COLLISION
if self.SetSurroundingBoundsType then -- !!!!!!!!!!!!!! Outdated GMod Compatibility! !!!!!!!!!!!!!!
self:SetSurroundingBoundsType(BOUNDS_HITBOXES) // BOUNDS_COLLISION
end
self.ExtraCorpsesToRemove_Transition = {}
self.VJ_AddCertainEntityAsEnemy = {}
self.VJ_AddCertainEntityAsFriendly = {}
Expand Down

0 comments on commit 18bf97d

Please sign in to comment.