2022-11-19 09:16:00 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require_relative '../snap_item_base'
|
|
|
|
|
|
|
|
class NetObj
|
|
|
|
class PlayerInfo < SnapItemBase
|
|
|
|
attr_accessor :player_flags, :score, :latency
|
|
|
|
|
|
|
|
def initialize(hash_or_raw)
|
2024-02-21 06:44:49 +00:00
|
|
|
@type = NETOBJTYPE_PLAYERINFO
|
2022-11-19 09:16:00 +00:00
|
|
|
@field_names = %i[
|
|
|
|
player_flags
|
|
|
|
score
|
|
|
|
latency
|
|
|
|
]
|
|
|
|
super
|
|
|
|
end
|
|
|
|
|
|
|
|
def self.match_type?(type)
|
|
|
|
type == NETOBJTYPE_PLAYERINFO
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|