1
0
mirror of https://github.com/Earu/EasyChat.git synced 2025-03-04 03:13:20 -05:00

some fixes for serverside markup

This commit is contained in:
Earu 2022-08-21 20:59:12 +02:00
parent 3f88eb3972
commit cf0779c376
2 changed files with 3 additions and 3 deletions

View File

@ -282,7 +282,7 @@ twemoji_part.Examples = nil
function twemoji_part:Ctor(str)
local em_components = str:Split(",")
local name = em_components[1]
self.Height = draw.GetFontHeight(self.HUD.DefaultFont)
self.Height = CLIENT and draw.GetFontHeight(self.HUD.DefaultFont) or 16
self:TryGetEmote(name)
self:ComputeSize()

View File

@ -519,7 +519,7 @@ function texture_part:Ctor(str)
local mat = Material(path, path:EndsWith(".png") and "nocull noclamp" or nil)
if not mat then
self.Invalid = true
self.TextureSize = math.Clamp(tonumber(texture_components[2]) or draw.GetFontHeight(self.HUD.DefaultFont), 16, 64)
self.TextureSize = math.Clamp(tonumber(texture_components[2]) or (CLIENT and draw.GetFontHeight(self.HUD.DefaultFont) or 16), 16, 64)
return self
end
@ -541,7 +541,7 @@ function texture_part:Ctor(str)
end
if not self.Material then self.Invalid = true end
self.TextureSize = math.Clamp(tonumber(texture_components[2]) or draw.GetFontHeight(self.HUD.DefaultFont), 16, 64)
self.TextureSize = math.Clamp(tonumber(texture_components[2]) or (CLIENT and draw.GetFontHeight(self.HUD.DefaultFont) or 16), 16, 64)
return self
end