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:
parent
3f88eb3972
commit
cf0779c376
@ -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()
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user