first commit

This commit is contained in:
2026-02-26 17:52:48 +09:00
commit dabf1f3ba9
49 changed files with 14883 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
package world
import "a301_game_server/pkg/mathutil"
// ZonePortal defines a connection between two zones.
type ZonePortal struct {
// Trigger area in source zone.
SourceZoneID uint32
TriggerPos mathutil.Vec3
TriggerRadius float32
// Destination in target zone.
TargetZoneID uint32
TargetPos mathutil.Vec3
}
// IsInRange returns true if the given position is within the portal's trigger area.
func (p *ZonePortal) IsInRange(pos mathutil.Vec3) bool {
return pos.DistanceXZ(p.TriggerPos) <= p.TriggerRadius
}