Jump to content


Photo

Subtitles in intro


  • Please log in to reply
27 replies to this topic

#26 stumpy

stumpy

    Advanced Member

  • Member
  • PipPipPip
  • 1646 posts

Posted 22 March 2017 - 11:05 AM

this is the routine in snd_world.cpp that displays the drawSound position and distance name

 

Spoiler

 

all that would be needed is a map.script access to

 

GetName

distance (distance through a visportal)

realDistance (distance if using noclip)

min (its in meters) sound min radius

max (its in meters) sound max radius

 

as you can already get player position with $player1.getWorldOrigin() or maybe with the entity name get entity name World Origin.

 

sprintf( text, "%s (%i/%i %i/%i)%s", chan->soundShader->GetName(), (int)def->distance,
                        (int)def->realDistance, (int)min, (int)max, defaulted );

 

without having to turn on the debugging s_drawSound cvar.

 

be along lines of measure distance between player and sound being played if its a vocal sound and within range say 10 meters (about 35 feet) write subtitle text to gui based on language of l18m, along the lines of if there aren't any polish vocal then you could write the polish text for what the vocal is.


Edited by stumpy, 22 March 2017 - 09:51 PM.


#27 stumpy

stumpy

    Advanced Member

  • Member
  • PipPipPip
  • 1646 posts

Posted 24 March 2017 - 12:32 PM

In the doom 3 [cc] they seem to have overly complicated how it should work, as they seem to have used the #str_00000 system in adding there names to the credits gui but seem to have missed that they could use the same system for different languages, without having to add code for people to select their language.



#28 NeonsStyle

NeonsStyle

    Advanced Member

  • Member
  • PipPipPip
  • 1052 posts

Posted 25 March 2017 - 10:55 AM

I'm sorry for asking a common question. I have just registered in the forum and couldn't see the search dialog so far.

 

Search diaglog is at the top right of the main page.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users