ACSUtils Wiki

An ACS library for ZDoom-based ports

User Tools

Site Tools


functions:identifysourceport

IdentifySourcePort

int IdentifySourcePort()

Description

Identifies the port the mod is being played in.

Returns one of the following constants:

  • PORT_ZDOOM
  • PORT_GZDOOM
  • PORT_ZANDRONUM

Inner workings

The function performs the following checks:

  1. If GetPlayerAccountName(0) returns a non-zero result (even an empty string), it is implemented and the port is assumed to be Zandronum.
  2. If a DynamicLight actor can be spawned, the port is assumed to be GZDoom.
  3. Otherwise it's ZDoom.
functions/identifysourceport.txt · Last modified: 2017/03/19 13:19 by korshun