Marathon Resurrection Terminals

Discussions about Coding and Scripting
User avatar
Aspide
Experienced
Posts: 135
Joined: Wed Jun 09, 2021 12:13 am

Marathon Resurrection Terminals

Post by Aspide »

Hello, my name is Mathias and I'm very excited to be part of this website :D . The unreal franchise has been a big part of my life, especially UT99. At first I was only playing the game and downloading custom content, but recently I've been learning how to use UnrealScript. And now I am facing a problem beyond my paygrade...

In Marathon Resurrection (a UT99 mod), there is this actor that doesn't work online, I have tried to fix it with no results, if anyone can help me I would really appreciate it.

Code: Select all

//=============================================================================
// MarathonTerminal.
// copyright Andrew Fabans 2000
//=============================================================================
class MarathonTerminal extends Actor;

//struct TermPict
//{
//	var() texture Texture;	// Texture containing the pict - pict must be in upper left
//	var() int SizeX;		// X size of portion of pict to draw
//	var() int SizeY;		// Y size size of portion of pict to draw
//	var() int OffsetX;		// X offset into pict from left
//	var() int OffsetY;		// Y offset into pict from top
//};

var() bool bDebug;
var() sound LoginSound;
var() sound PageSound;
var() sound OffSound;
var() name EndEvent;
var() string Login;
//var() TermPict TermPix[8];	// Array of picts
var() name TermCam[8];	// Array of camera actors
var() string TermText[256];

const pagetag="#pp";
const pagelines = 20;		// Number of lines per page including header & footer
const lineheight = 15;		// Pixel height of line
var int ClipX,ClipY;
var Playerpawn Reader;
var int pagenum;			// Number of page to display - login = pp 0
var bool bLogin,bDrawLogin;
var Rotator	startrot;

var int HUDX,HUDY,HUDSizeX,HUDSizeY;

var EPhysics oldphys;
var Name oldwepstate;

var string PgUpKey, PgDnKey, ActionKey;
var string KeyAlias[255];


simulated function PostBeginPlay()
{
	pagenum = 0;
	bLogin = FALSE;
	bDrawLogin = FALSE;

}


simulated function Trigger (actor Other, pawn EventInstigator )
{
	local int i;

	if ( EventInstigator != None )
		if ( EventInstigator.Isa('Playerpawn') )
		{
			Reader = PlayerPawn(EventInstigator);
			if ( Reader.myHUD.IsA('MarathonHUD') )
			{
				if ( !MarathonHud(Reader.myHUD).bDrawTerm )
				{
					MarathonHud(Reader.myHUD).Terminal = Self;
					MarathonHud(Reader.myHUD).bDrawTerm = TRUE;
					bLogin = TRUE;
					pagenum = 0;
					startrot = Reader.Rotation;
					Reader.PlaySound(LoginSound);
					oldphys = Reader.Physics;
					Reader.SetPhysics(PHYS_None);
					if ( Reader.Weapon.IsA('MaraWeapon') )
					{
						oldwepstate = Reader.Weapon.GetStateName();
						Reader.Weapon.GotoState('DontShoot');
					}
					if ( bDebug )
					{
						Log("MarathonTerminal: EventInstigator = "$Reader );
						Log("MarathonTerminal: HUD = "$Reader.myHUD );
					}

					// jason
					LoadKeyBindings( Reader );
					PgUpKey = "";
					PgDnKey = "";
					ActionKey = "";

					for (i=0; i<255; i++)
					{
						if (KeyAlias[i] ~= "MaraTermPgUp")
						{
							if (PgUpKey != "")
								PgUpKey = PgUpKey$","@class'UMenuCustomizeClientWindow'.default.LocalizedKeyName[i];
							else
								PgUpKey = class'UMenuCustomizeClientWindow'.default.LocalizedKeyName[i];
						}
						if (KeyAlias[i] ~= "MaraTermPgDn")
						{
							if (PgDnKey != "")
								PgDnKey = PgDnKey$","@class'UMenuCustomizeClientWindow'.default.LocalizedKeyName[i];
							else
								PgDnKey = class'UMenuCustomizeClientWindow'.default.LocalizedKeyName[i];
						}
						if (KeyAlias[i] ~= "mutate actionkey" || KeyAlias[i] ~= "InventoryActivate")
						{
							if (ActionKey != "")
								ActionKey = ActionKey$","@class'UMenuCustomizeClientWindow'.default.LocalizedKeyName[i];
							else
								ActionKey = class'UMenuCustomizeClientWindow'.default.LocalizedKeyName[i];
						}
					}
					//


				}
				else
				{
					if ( EventInstigator == Reader )
					{
						MarathonHud(Reader.myHUD).Terminal = None;
						MarathonHud(Reader.myHUD).bDrawTerm = FALSE;
						Reader.SetPhysics(oldphys);
						if ( Reader.Weapon.IsA('MaraWeapon') )
							Reader.Weapon.GotoState(oldwepstate);
					}
				}
			}
		}
}

// jason
simulated function LoadKeyBindings(PlayerPawn P)
{
	local int i;
	local string k;

	for (i=0; i<255; i++)
	{
		k = P.ConsoleCommand( "KEYNAME "$i );
		KeyAlias[i] = P.ConsoleCommand( "KEYBINDING "$k );
	}
}
//


simulated function Timer()
{

	if ( pagenum == 0 )
		pagenum++;
	if ( bDebug )
		Log("MarathonTerminal: Timer" );
}



simulated function PageUp()
{
	if ( Reader != None )
	{
		Reader.PlaySound(PageSound);
		if ( pagenum == 0 )
		{
			MarathonHud(Reader.myHUD).Terminal = None;
			MarathonHud(Reader.myHUD).bDrawTerm = FALSE;
			Reader.SetPhysics(oldphys);
			if ( Reader.Weapon.IsA('MaraWeapon') )
				Reader.Weapon.GotoState(oldwepstate);
			return;
		}
		pagenum = Max( 0, pagenum - 1 );
		bLogin = pagenum <= 0;
	}
}



simulated function PageDown()
{
	if ( Reader != None )
	{
		Reader.PlaySound(PageSound);
		pagenum++;
	}
}



function DoEndEvent()
{
local actor a;

	foreach AllActors(class'Actor',a,EndEvent)
		a.Trigger(Self,Reader);
}



simulated function DrawLogin( canvas Canvas )
{
//local int HUDX,HUDY,HUDSizeX,HUDSizeY;

	if ( Canvas == None )
		return;
	Canvas.Reset();
//	HUDX = MarathonHud(Reader.myHUD).HUDX;
//	HUDY = MarathonHud(Reader.myHUD).HUDY;
//	HUDSizeX = MarathonHud(Reader.myHUD).HUDSizeX;
//	HUDSizeY = MarathonHud(Reader.myHUD).HUDSizeY;
	Canvas.DrawColor.R = 255;
	Canvas.DrawColor.G = 255;
	Canvas.DrawColor.B = 255;
	Canvas.SetPos(HUDX + HUDSizeX/2 - 64,HUDY - ((pagelines+2) * lineheight)/2 - 64);
	Canvas.DrawTile(Texture'ThonLogo',128,128,0,0,128,128);
	Canvas.bCenter = TRUE;
	Canvas.DrawColor.R = 0;
	Canvas.DrawColor.G = 255;
	Canvas.DrawColor.B = 16;
	Canvas.Font = Font'SmTermFont';
	Canvas.SetPos(0,HUDY - ((pagelines+3) * lineheight)/2 + 64);
	Canvas.Drawtext("U.E.S.C. Marathon",FALSE);
	Canvas.SetPos(0,HUDY - (pagelines * lineheight)/2 + 64);
	Canvas.Drawtext(Login,FALSE);
	Canvas.bCenter = FALSE;
	if ( bLogin )
	{
		bLogin = FALSE;
		SetTimer(2.0,FALSE);
	}
}



simulated function DrawTerminal(canvas Canvas)
{
local int i,index;
local int ppstart,ppend;
local string text;
local texture pict;
local float width,height;
//local int HUDX,HUDY,HUDSizeX,HUDSizeY;
local float wepdrawscale;

	if ( Canvas == None )
		return;
//	HUDSizeX = MarathonHud(Reader.myHUD).HUDSizeX;
//	HUDSizeY = MarathonHud(Reader.myHUD).HUDSizeY;
	HUDSizeX = 640;
	HUDSizeY = 160;
//	HUDX = MarathonHud(Reader.myHUD).HUDX;
//	HUDY = MarathonHud(Reader.myHUD).HUDY;
	HUDX = Canvas.SizeX / 2 - HUDSizeX / 2;
	HUDY = Canvas.SizeY - HUDSizeY;
	Canvas.Reset();
	Canvas.DrawColor.R = 0;
	Canvas.DrawColor.G = 0;
	Canvas.DrawColor.B = 0;
	Canvas.SetPos(HUDX,HUDY - (pagelines * lineheight));
	Canvas.DrawTile(Texture'UWindow.BlackTexture',HUDSizeX,pagelines * lineheight,0,0,HUDSizeX,pagelines * lineheight);
	Canvas.SetPos(HUDX,HUDY - (pagelines * lineheight));
	Canvas.DrawColor.R = 54;
	Canvas.DrawTile(Texture'UWindow.WhiteTexture',HUDSizeX,lineheight,0,0,HUDSizeX,lineheight);
	Canvas.SetPos(HUDX,HUDY - lineheight);
	Canvas.DrawTile(Texture'UWindow.WhiteTexture',HUDSizeX,lineheight,0,0,HUDSizeX,lineheight);
	Canvas.DrawColor.R = 255;
	Canvas.Font = Font'SmTermFont';

	// draw terminal header.
	Canvas.SetPos(HUDX + 4,HUDY - (pagelines * lineheight));
	Canvas.Drawtext("UESCTerm 802.11 (remote override)",FALSE);

	// draw time.
	text = PadNum(Level.Hour)$PadNum(Level.Minute)$" "$PadNum(Level.Month)$"."$PadNum(Level.Day)$".2337";
	Canvas.StrLen(text,width,height);

	Canvas.SetPos(HUDX + HUDSizeX - width - 4,HUDY - (pagelines * lineheight));
	Canvas.Drawtext(text,FALSE);

	// draw pgdn/pgup to scroll
	Canvas.SetPos(HUDX + 4,HUDY - lineheight);
//	Canvas.Drawtext("PgUp/PgDown To Scroll",FALSE);
	Canvas.DrawText(PgUpKey$"/"$PgDnKey$" To Scroll", False);  // jason

	// Acknowledge.
	text = ActionKey$" To Acknowledge";
	Canvas.StrLen(text,width,height);

	Canvas.SetPos(HUDX + HUDSizeX - width - 4,HUDY - lineheight);
	Canvas.Drawtext(text,FALSE);




	if ( pagenum <= 0 )
	{
		DrawLogin( Canvas );
		return;
	}

	Canvas.Font = Font'SmTermFont';
	Canvas.OrgX = HUDX + 4;
	Canvas.OrgY = HUDY - (pagelines * lineheight) + 1 + lineheight;
	ClipX = HUDSizeX - 4;
//	ClipY = HUDY - lineheight - 1;
	ClipY = lineheight;
	Canvas.SetPos(0,0);
	if ( FindPage(pagenum,ppstart,ppend) && !Reader.IsInState('Dying') )
	{
		for (i=ppstart;i<ppend;i++)
		{
			if ( Left(TermText[i],12) ~= "#checkpoint " )
			{
			index = Int(Right(TermText[i],1));
				if ( TermCam[index] != 'None' )
				{
					/*
					wepdrawscale = Reader.Weapon.DrawScale;
					Reader.Weapon.DrawScale = 0.0;
					DrawLiveFeed(Canvas, TermCam[index],
								 HUDX + 4, HUDY - (lineheight*(pagelines-1)) + 4,
								 HUDSizeX/2 - 8, (lineheight*(pagelines-2)) - 8);
					Reader.Weapon.DrawScale = wepdrawscale;
					*/

					Canvas.OrgX = HUDX + HUDSizeX/2 + 8;
					ClipX = HUDSizeX/2 - 8;
				}
			}
			else if ( TermText[i] == " " )
			{
				Canvas.SetPos(0,Canvas.CurY + lineheight);
			}
			else
			{
				Canvas.DrawColor.R = 0;
				Canvas.DrawColor.G = 255;
				Canvas.DrawColor.B = 16;
				text = TermText[i];
				if ( bDebug )
					log ( "MarathonTerminal: Termtext["$i$"]=''"$text$"''" );
				DrawParagraph(Canvas,text);
//				index = 0;
//				do
//				{
//					text = DrawWord(Canvas,text);
//					if ( bDebug )
//						log ( "MarathonTerminal: text=''"$text$"''" );
//					index++;
//				} until ( Len(text) <= 0 || index >= 100);
//				if ( Canvas.CurX != 0 )
//					Canvas.SetPos(0,Canvas.CurY + lineheight);
			}
		}



		// drawportal fucks up canvas positioning in opengl so we wanna do it last. (jason)
		if ( Canvas.OrgX != HUDX + 4 )
		{
			wepdrawscale = Reader.Weapon.DrawScale;
			Reader.Weapon.DrawScale = 0.0;
			DrawLiveFeed(Canvas, TermCam[index],
						 HUDX + 4, HUDY - (lineheight*(pagelines-1)) + 4,
						 HUDSizeX/2 - 8, (lineheight*(pagelines-2)) - 8);
			Reader.Weapon.DrawScale = wepdrawscale;
		}


	}
	else
	{
		if ( EndEvent != 'None')
			DoEndEvent();
		MarathonHud(Reader.myHUD).Terminal = None;
		MarathonHud(Reader.myHUD).bDrawTerm = FALSE;
		Reader.SetPhysics(oldphys);
		if ( Reader.Weapon.IsA('MaraWeapon') )
			Reader.Weapon.GotoState(oldwepstate);
	}
	Canvas.Reset();
}



simulated function string PadNum(int num)
{
	if ( num < 10 )
		return "0"$num;
	else
		return String(num);
}



simulated function DrawParagraph( canvas Canvas, string text )
{
local int index;
local int y,lastcol;
local float width,height;

	if ( InStr(text," ") < 0 )	//If TRUE then we won't worry about wrapping at spaces
	{
		Canvas.StrLen("X",width,height);
		lastcol = Int(ClipX/width);
		index = 0;
		do
		{
			y = Canvas.CurY;
			Canvas.DrawText(Left(text,lastcol),FALSE);
			Canvas.SetPos(0,y + lineheight);
			text = Right(text,Len(text)-lastcol);
			index++;
		} until ( Len(text) <= 0 || index >= 100);
	}
	else
	{
		index = 0;
		do
		{
			text = DrawWord(Canvas,text);
			if ( bDebug )
				log ( "MarathonTerminal: text=''"$text$"''" );
			index++;
		} until ( Len(text) <= 0 || index >= 100);
		Canvas.SetPos(0,Canvas.CurY + lineheight);
	}
}



simulated function string DrawWord(canvas Canvas, string text)
{

local int index,X,Y;
local string word;
local bool bUnbold;
local float width,height;

	if ( Len(text) <= 0 )
		return text;
	bUnbold = FALSE;
	index = 0;
	// Strip out leading spaces
	for(index=0;Mid(text,index,1)==" " && index < Len(text);index++)
	{
	}
	if ( index > 0 )
		text = Right(text,Len(text) - index);
	// Find word end
	if ( Len(text) <= 0 )
		return text;
	for(index=0;Mid(text,index,1)!=" " && index < Len(text);index++)
	{
	}
	if ( index > 0 )
	{
		word = Left(text,index);
		text = Right(text,Len(text) - index - 1);
	}
	// test for text formatting strings
	if ( Left(word,2) == "$B" )
	{
		Canvas.Font = Font'SmBoldTermFont';
		word = Right(word, Len(word) - 2);
	}
	else if ( Left(word,2) == "$b" )
	{
		Canvas.Font = Font'SmTermFont';
		word = Right(word, Len(word) - 2);
	}
	if ( Right(word,2) == "$b" )
	{
		bUnbold = TRUE;
		word = Left(word,Len(word) - 2);
	}
	if ( Len(word) <= 0 )
		return text;
	Canvas.StrLen(" "$word,width,height);
	if ( width + Canvas.CurX >= ClipX )
	{
		Canvas.SetPos(0,Canvas.CurY+lineheight);
	}
	else
	{
		if (Canvas.CurX != 0 )
		word = " "$word;
	}
	X = Canvas.CurX;
	Y = Canvas.CurY;
	Canvas.StrLen(word,width,height);
	if ( height + Y < 25 * lineheight )
		Canvas.Drawtext(word,FALSE);
	else
		text = "";
	Canvas.SetPos(X + width,Y);
	if ( bUnbold )
		Canvas.Font = Font'SmTermFont';
	return text;
}


simulated function bool FindPage(int page, out int ppstart, out int ppend)
{
local int i,j;
local int termlines;

	termlines = ArrayCount(TermText) - 1;
	ppstart = 0;
	ppend = 0;
	if ( page > 1 )
	{
		for (i=1;i<page;i++)
		{
			j = ppstart;
			for (ppstart=j; !(Left(TermText[ppstart],Len(pagetag)) == pagetag)
				&& (ppstart < termlines); ppstart++)
			{
			}
			if (ppstart < termlines)
				ppstart++;
		}
	}
	for (ppend=ppstart; Left(TermText[ppend],Len(pagetag)) != pagetag
		&& (ppend < termlines); ppend++)
	{
	}
	return ppstart + 1 < termlines;
}



simulated function bool DrawLiveFeed( canvas Canvas, name camname, int X, int Y, int SizeX, int SizeY )
{
local MarathonSecCam thecam;
local bool bOrigBView;

	foreach AllActors(class'MarathonMOD.MarathonSecCam',thecam,camname)
		if ( thecam != None )
			break;		// We'll take the first one 'cause There Can Be Only One.
	if ( thecam != None )
	{
		Canvas.DrawPortal ( X, Y, SizeX, SizeY, Reader, thecam.Location,
				thecam.Rotation + Reader.Rotation - startrot, 90, TRUE);
	}
}

defaultproperties
{
      bDebug=False
      LoginSound=Sound'MarathonMOD.MaraSnds.Terminal'
      PageSound=Sound'MarathonMOD.MaraSnds.TerminalPage'
      OffSound=Sound'MarathonMOD.MaraSnds.TerminalOff'
      EndEvent="None"
      Login=""
      TermCam(0)="None"
      TermCam(1)="None"
      TermCam(2)="None"
      TermCam(3)="None"
      TermCam(4)="None"
      TermCam(5)="None"
      TermCam(6)="None"
      TermCam(7)="None"
      TermText(0)=""
      TermText(1)=""
      TermText(2)=""
      TermText(3)=""
      TermText(4)=""
      TermText(5)=""
      TermText(6)=""
      TermText(7)=""
      TermText(8)=""
      TermText(9)=""
      TermText(10)=""
      TermText(11)=""
      TermText(12)=""
      TermText(13)=""
      TermText(14)=""
      TermText(15)=""
      TermText(16)=""
      TermText(17)=""
      TermText(18)=""
      TermText(19)=""
      TermText(20)=""
      TermText(21)=""
      TermText(22)=""
      TermText(23)=""
      TermText(24)=""
      TermText(25)=""
      TermText(26)=""
      TermText(27)=""
      TermText(28)=""
      TermText(29)=""
      TermText(30)=""
      TermText(31)=""
      TermText(32)=""
      TermText(33)=""
      TermText(34)=""
      TermText(35)=""
      TermText(36)=""
      TermText(37)=""
      TermText(38)=""
      TermText(39)=""
      TermText(40)=""
      TermText(41)=""
      TermText(42)=""
      TermText(43)=""
      TermText(44)=""
      TermText(45)=""
      TermText(46)=""
      TermText(47)=""
      TermText(48)=""
      TermText(49)=""
      TermText(50)=""
      TermText(51)=""
      TermText(52)=""
      TermText(53)=""
      TermText(54)=""
      TermText(55)=""
      TermText(56)=""
      TermText(57)=""
      TermText(58)=""
      TermText(59)=""
      TermText(60)=""
      TermText(61)=""
      TermText(62)=""
      TermText(63)=""
      TermText(64)=""
      TermText(65)=""
      TermText(66)=""
      TermText(67)=""
      TermText(68)=""
      TermText(69)=""
      TermText(70)=""
      TermText(71)=""
      TermText(72)=""
      TermText(73)=""
      TermText(74)=""
      TermText(75)=""
      TermText(76)=""
      TermText(77)=""
      TermText(78)=""
      TermText(79)=""
      TermText(80)=""
      TermText(81)=""
      TermText(82)=""
      TermText(83)=""
      TermText(84)=""
      TermText(85)=""
      TermText(86)=""
      TermText(87)=""
      TermText(88)=""
      TermText(89)=""
      TermText(90)=""
      TermText(91)=""
      TermText(92)=""
      TermText(93)=""
      TermText(94)=""
      TermText(95)=""
      TermText(96)=""
      TermText(97)=""
      TermText(98)=""
      TermText(99)=""
      TermText(100)=""
      TermText(101)=""
      TermText(102)=""
      TermText(103)=""
      TermText(104)=""
      TermText(105)=""
      TermText(106)=""
      TermText(107)=""
      TermText(108)=""
      TermText(109)=""
      TermText(110)=""
      TermText(111)=""
      TermText(112)=""
      TermText(113)=""
      TermText(114)=""
      TermText(115)=""
      TermText(116)=""
      TermText(117)=""
      TermText(118)=""
      TermText(119)=""
      TermText(120)=""
      TermText(121)=""
      TermText(122)=""
      TermText(123)=""
      TermText(124)=""
      TermText(125)=""
      TermText(126)=""
      TermText(127)=""
      TermText(128)=""
      TermText(129)=""
      TermText(130)=""
      TermText(131)=""
      TermText(132)=""
      TermText(133)=""
      TermText(134)=""
      TermText(135)=""
      TermText(136)=""
      TermText(137)=""
      TermText(138)=""
      TermText(139)=""
      TermText(140)=""
      TermText(141)=""
      TermText(142)=""
      TermText(143)=""
      TermText(144)=""
      TermText(145)=""
      TermText(146)=""
      TermText(147)=""
      TermText(148)=""
      TermText(149)=""
      TermText(150)=""
      TermText(151)=""
      TermText(152)=""
      TermText(153)=""
      TermText(154)=""
      TermText(155)=""
      TermText(156)=""
      TermText(157)=""
      TermText(158)=""
      TermText(159)=""
      TermText(160)=""
      TermText(161)=""
      TermText(162)=""
      TermText(163)=""
      TermText(164)=""
      TermText(165)=""
      TermText(166)=""
      TermText(167)=""
      TermText(168)=""
      TermText(169)=""
      TermText(170)=""
      TermText(171)=""
      TermText(172)=""
      TermText(173)=""
      TermText(174)=""
      TermText(175)=""
      TermText(176)=""
      TermText(177)=""
      TermText(178)=""
      TermText(179)=""
      TermText(180)=""
      TermText(181)=""
      TermText(182)=""
      TermText(183)=""
      TermText(184)=""
      TermText(185)=""
      TermText(186)=""
      TermText(187)=""
      TermText(188)=""
      TermText(189)=""
      TermText(190)=""
      TermText(191)=""
      TermText(192)=""
      TermText(193)=""
      TermText(194)=""
      TermText(195)=""
      TermText(196)=""
      TermText(197)=""
      TermText(198)=""
      TermText(199)=""
      TermText(200)=""
      TermText(201)=""
      TermText(202)=""
      TermText(203)=""
      TermText(204)=""
      TermText(205)=""
      TermText(206)=""
      TermText(207)=""
      TermText(208)=""
      TermText(209)=""
      TermText(210)=""
      TermText(211)=""
      TermText(212)=""
      TermText(213)=""
      TermText(214)=""
      TermText(215)=""
      TermText(216)=""
      TermText(217)=""
      TermText(218)=""
      TermText(219)=""
      TermText(220)=""
      TermText(221)=""
      TermText(222)=""
      TermText(223)=""
      TermText(224)=""
      TermText(225)=""
      TermText(226)=""
      TermText(227)=""
      TermText(228)=""
      TermText(229)=""
      TermText(230)=""
      TermText(231)=""
      TermText(232)=""
      TermText(233)=""
      TermText(234)=""
      TermText(235)=""
      TermText(236)=""
      TermText(237)=""
      TermText(238)=""
      TermText(239)=""
      TermText(240)=""
      TermText(241)=""
      TermText(242)=""
      TermText(243)=""
      TermText(244)=""
      TermText(245)=""
      TermText(246)=""
      TermText(247)=""
      TermText(248)=""
      TermText(249)=""
      TermText(250)=""
      TermText(251)=""
      TermText(252)=""
      TermText(253)=""
      TermText(254)=""
      TermText(255)=""
      ClipX=0
      ClipY=0
      Reader=None
      pagenum=0
      bLogin=False
      bDrawLogin=False
      StartRot=(Pitch=0,Yaw=0,Roll=0)
      HUDX=0
      HUDY=0
      HUDsizeX=0
      HUDSizeY=0
      oldphys=PHYS_None
      oldwepstate="None"
      PgUpKey=""
      PgDnKey=""
      ActionKey=""
      KeyAlias(0)=""
      KeyAlias(1)=""
      KeyAlias(2)=""
      KeyAlias(3)=""
      KeyAlias(4)=""
      KeyAlias(5)=""
      KeyAlias(6)=""
      KeyAlias(7)=""
      KeyAlias(8)=""
      KeyAlias(9)=""
      KeyAlias(10)=""
      KeyAlias(11)=""
      KeyAlias(12)=""
      KeyAlias(13)=""
      KeyAlias(14)=""
      KeyAlias(15)=""
      KeyAlias(16)=""
      KeyAlias(17)=""
      KeyAlias(18)=""
      KeyAlias(19)=""
      KeyAlias(20)=""
      KeyAlias(21)=""
      KeyAlias(22)=""
      KeyAlias(23)=""
      KeyAlias(24)=""
      KeyAlias(25)=""
      KeyAlias(26)=""
      KeyAlias(27)=""
      KeyAlias(28)=""
      KeyAlias(29)=""
      KeyAlias(30)=""
      KeyAlias(31)=""
      KeyAlias(32)=""
      KeyAlias(33)=""
      KeyAlias(34)=""
      KeyAlias(35)=""
      KeyAlias(36)=""
      KeyAlias(37)=""
      KeyAlias(38)=""
      KeyAlias(39)=""
      KeyAlias(40)=""
      KeyAlias(41)=""
      KeyAlias(42)=""
      KeyAlias(43)=""
      KeyAlias(44)=""
      KeyAlias(45)=""
      KeyAlias(46)=""
      KeyAlias(47)=""
      KeyAlias(48)=""
      KeyAlias(49)=""
      KeyAlias(50)=""
      KeyAlias(51)=""
      KeyAlias(52)=""
      KeyAlias(53)=""
      KeyAlias(54)=""
      KeyAlias(55)=""
      KeyAlias(56)=""
      KeyAlias(57)=""
      KeyAlias(58)=""
      KeyAlias(59)=""
      KeyAlias(60)=""
      KeyAlias(61)=""
      KeyAlias(62)=""
      KeyAlias(63)=""
      KeyAlias(64)=""
      KeyAlias(65)=""
      KeyAlias(66)=""
      KeyAlias(67)=""
      KeyAlias(68)=""
      KeyAlias(69)=""
      KeyAlias(70)=""
      KeyAlias(71)=""
      KeyAlias(72)=""
      KeyAlias(73)=""
      KeyAlias(74)=""
      KeyAlias(75)=""
      KeyAlias(76)=""
      KeyAlias(77)=""
      KeyAlias(78)=""
      KeyAlias(79)=""
      KeyAlias(80)=""
      KeyAlias(81)=""
      KeyAlias(82)=""
      KeyAlias(83)=""
      KeyAlias(84)=""
      KeyAlias(85)=""
      KeyAlias(86)=""
      KeyAlias(87)=""
      KeyAlias(88)=""
      KeyAlias(89)=""
      KeyAlias(90)=""
      KeyAlias(91)=""
      KeyAlias(92)=""
      KeyAlias(93)=""
      KeyAlias(94)=""
      KeyAlias(95)=""
      KeyAlias(96)=""
      KeyAlias(97)=""
      KeyAlias(98)=""
      KeyAlias(99)=""
      KeyAlias(100)=""
      KeyAlias(101)=""
      KeyAlias(102)=""
      KeyAlias(103)=""
      KeyAlias(104)=""
      KeyAlias(105)=""
      KeyAlias(106)=""
      KeyAlias(107)=""
      KeyAlias(108)=""
      KeyAlias(109)=""
      KeyAlias(110)=""
      KeyAlias(111)=""
      KeyAlias(112)=""
      KeyAlias(113)=""
      KeyAlias(114)=""
      KeyAlias(115)=""
      KeyAlias(116)=""
      KeyAlias(117)=""
      KeyAlias(118)=""
      KeyAlias(119)=""
      KeyAlias(120)=""
      KeyAlias(121)=""
      KeyAlias(122)=""
      KeyAlias(123)=""
      KeyAlias(124)=""
      KeyAlias(125)=""
      KeyAlias(126)=""
      KeyAlias(127)=""
      KeyAlias(128)=""
      KeyAlias(129)=""
      KeyAlias(130)=""
      KeyAlias(131)=""
      KeyAlias(132)=""
      KeyAlias(133)=""
      KeyAlias(134)=""
      KeyAlias(135)=""
      KeyAlias(136)=""
      KeyAlias(137)=""
      KeyAlias(138)=""
      KeyAlias(139)=""
      KeyAlias(140)=""
      KeyAlias(141)=""
      KeyAlias(142)=""
      KeyAlias(143)=""
      KeyAlias(144)=""
      KeyAlias(145)=""
      KeyAlias(146)=""
      KeyAlias(147)=""
      KeyAlias(148)=""
      KeyAlias(149)=""
      KeyAlias(150)=""
      KeyAlias(151)=""
      KeyAlias(152)=""
      KeyAlias(153)=""
      KeyAlias(154)=""
      KeyAlias(155)=""
      KeyAlias(156)=""
      KeyAlias(157)=""
      KeyAlias(158)=""
      KeyAlias(159)=""
      KeyAlias(160)=""
      KeyAlias(161)=""
      KeyAlias(162)=""
      KeyAlias(163)=""
      KeyAlias(164)=""
      KeyAlias(165)=""
      KeyAlias(166)=""
      KeyAlias(167)=""
      KeyAlias(168)=""
      KeyAlias(169)=""
      KeyAlias(170)=""
      KeyAlias(171)=""
      KeyAlias(172)=""
      KeyAlias(173)=""
      KeyAlias(174)=""
      KeyAlias(175)=""
      KeyAlias(176)=""
      KeyAlias(177)=""
      KeyAlias(178)=""
      KeyAlias(179)=""
      KeyAlias(180)=""
      KeyAlias(181)=""
      KeyAlias(182)=""
      KeyAlias(183)=""
      KeyAlias(184)=""
      KeyAlias(185)=""
      KeyAlias(186)=""
      KeyAlias(187)=""
      KeyAlias(188)=""
      KeyAlias(189)=""
      KeyAlias(190)=""
      KeyAlias(191)=""
      KeyAlias(192)=""
      KeyAlias(193)=""
      KeyAlias(194)=""
      KeyAlias(195)=""
      KeyAlias(196)=""
      KeyAlias(197)=""
      KeyAlias(198)=""
      KeyAlias(199)=""
      KeyAlias(200)=""
      KeyAlias(201)=""
      KeyAlias(202)=""
      KeyAlias(203)=""
      KeyAlias(204)=""
      KeyAlias(205)=""
      KeyAlias(206)=""
      KeyAlias(207)=""
      KeyAlias(208)=""
      KeyAlias(209)=""
      KeyAlias(210)=""
      KeyAlias(211)=""
      KeyAlias(212)=""
      KeyAlias(213)=""
      KeyAlias(214)=""
      KeyAlias(215)=""
      KeyAlias(216)=""
      KeyAlias(217)=""
      KeyAlias(218)=""
      KeyAlias(219)=""
      KeyAlias(220)=""
      KeyAlias(221)=""
      KeyAlias(222)=""
      KeyAlias(223)=""
      KeyAlias(224)=""
      KeyAlias(225)=""
      KeyAlias(226)=""
      KeyAlias(227)=""
      KeyAlias(228)=""
      KeyAlias(229)=""
      KeyAlias(230)=""
      KeyAlias(231)=""
      KeyAlias(232)=""
      KeyAlias(233)=""
      KeyAlias(234)=""
      KeyAlias(235)=""
      KeyAlias(236)=""
      KeyAlias(237)=""
      KeyAlias(238)=""
      KeyAlias(239)=""
      KeyAlias(240)=""
      KeyAlias(241)=""
      KeyAlias(242)=""
      KeyAlias(243)=""
      KeyAlias(244)=""
      KeyAlias(245)=""
      KeyAlias(246)=""
      KeyAlias(247)=""
      KeyAlias(248)=""
      KeyAlias(249)=""
      KeyAlias(250)=""
      KeyAlias(251)=""
      KeyAlias(252)=""
      KeyAlias(253)=""
      KeyAlias(254)=""
      bHidden=True
      bNoDelete=True
      bAlwaysRelevant=True
      SoundRadius=64
      SoundVolume=192
}
Somewhere in Nevada...
User avatar
papercoffee
Godlike
Posts: 10244
Joined: Wed Jul 15, 2009 11:36 am
Personal rank: coffee addicted !!!
Location: Cologne, the city with the big cathedral.

Re: Marathon Resurrection Terminals

Post by papercoffee »

Is this actor only server side or does it affect clients as well?
I'm no coder but you should maybe look for the replication issue https://wiki.beyondunreal.com/Replication_overview
User avatar
Aspide
Experienced
Posts: 135
Joined: Wed Jun 09, 2021 12:13 am

Re: Marathon Resurrection Terminals

Post by Aspide »

The actor does affect clients, but the problem is that this actor changes some variables of the player's hud, like for example: MarathonHud(Reader.myHUD).bDrawTerm = TRUE. When this variable is set to true, the hud calls a function from MarathonTerminal:

Code: Select all


	if ( bDrawTerm && (Terminal != None) )
		Terminal.DrawTerminal(Canvas);

The problem is that when you are client the Terminal cannot change the variables of the player's hud, it is almost like there is no communication between the Terminal and the player's hud.
Somewhere in Nevada...
Buggie
Godlike
Posts: 1921
Joined: Sat Mar 21, 2020 5:32 am

Re: Marathon Resurrection Terminals

Post by Buggie »

Not see any replication block. So this class not send anything over net.
So you need read about replication block, study logic of the class and make some variables (and possible calls) replicated.
1337GameDev
Skilled
Posts: 198
Joined: Thu Apr 16, 2020 3:23 pm
Personal rank: GameDev

Re: Marathon Resurrection Terminals

Post by 1337GameDev »

Just thinking off the top of my head, but because this actor is part of another mod, I would keep it "stock" and add another "network sync" actor. You can rebundle, or invoke your new actor via a mutator / minor call in the mod you're modifying.

Then in that new actor you replicate it's state and modify the hud of clients.

Ideas / thoughts?
User avatar
Aspide
Experienced
Posts: 135
Joined: Wed Jun 09, 2021 12:13 am

Re: Marathon Resurrection Terminals

Post by Aspide »

Good news, after a two week struggle I have created a Marathon Terminal that works online, thanks guys for all your help :tu:
Somewhere in Nevada...