User:Max34/SourceRenewed: Difference between revisions
Jump to navigation
Jump to search
Note:Perhaps in the future it will be renamed to point_sound.
Code Fix:Fixed a crash when the filters tries to check an already deleted entity. If the entity does not exist when checking, the comparison will be made with an empty value.
Note:The parameter storing the coordinates in all logical entities will be removed in order to reduce the amount of information stored in the map. Also, for building logic in the new Hammer there will be a separate window (something in the style of a logical tree from the unreal engine).
Important:It was decided to remove this entity and transfer its functionality to the world itself. This is not currently implemented, so the entity still exists.
Code Fix:Fixed a bug that caused the deleted logic_branch to be treated as false instead of removing it from the list.
Note:The entity now uses a new optimization system. Since this system is not fully implemented, the entity is partially broken, for now.
mNo edit summary |
mNo edit summary |
||
Line 115: | Line 115: | ||
=== env_sound === | === env_sound === | ||
<p style="opacity:.6; margin-top:-8px">Old name: {{Code|preset=0|ambient_generic}}</p> | <p style="opacity:.6; margin-top:-8px">Old name: {{Code|preset=0|ambient_generic}}</p> | ||
{{Note|Perhaps in the future it will be renamed to {{Code|preset=2|point_sound}} | {{Note|Perhaps in the future it will be renamed to {{Code|preset=2|point_sound}}.}} | ||
{{Todo|More documentation.}} | {{Todo|More documentation.}} | ||
Line 218: | Line 218: | ||
== Logic Entities == | == Logic Entities == | ||
{{Note|The parameter storing the coordinates in all logical entities will be removed in order to reduce the amount of information stored in the map. Also, for building logic in the new Hammer there will be a separate window (something in the style of a logical tree from the unreal engine).}} | |||
=== logic_auto === | === logic_auto === | ||
{{Important|It was decided to remove this entity and transfer its functionality to the world itself. This is not currently implemented, so the entity still exists.}} | |||
{{ | |||
Line 692: | Line 694: | ||
* Trying to make engine code more readable. | * Trying to make engine code more readable. | ||
** Replaced all<br>{{Code|strcmp}}, {{Code|stricmp}}, {{Code|_stricmp}}, {{Code|Q_strcmp}}, {{Code|V_strcmp}}, {{Code|Q_stricmp}}, {{Code|V_stricmp}}, {{Code|FStrEq}}, {{Code|V_strlen}}, {{Code|Q_strlen}} {{Code|V_strlen}}, {{Code|Q_strcasecmp}}, {{Code|Q_strncasecmp}}, {{Code|V_strncasecmp}}, {{Code|V_strcasecmp}}<br>with more understandable and optimal<br>{{Code|StringEmpty}}, {{Code|StringsEqual}}, {{Code|StringsEqualCaseless}}, {{Code|StringsPartsEqual}}, {{Code|StringsCompare}}, {{Code|StringsCompareCaseless}} and {{Code|StringLength}}. | ** Replaced all<br>{{Code|strcmp}}, {{Code|stricmp}}, {{Code|_stricmp}}, {{Code|Q_strcmp}}, {{Code|V_strcmp}}, {{Code|Q_stricmp}}, {{Code|V_stricmp}}, {{Code|FStrEq}}, {{Code|V_strlen}}, {{Code|Q_strlen}} {{Code|V_strlen}}, {{Code|Q_strcasecmp}}, {{Code|Q_strncasecmp}}, {{Code|V_strncasecmp}}, {{Code|V_strcasecmp}}<br>with more understandable and optimal<br>{{Code|StringEmpty}}, {{Code|StringsEqual}}, {{Code|StringsEqualCaseless}}, {{Code|StringsPartsEqual}}, {{Code|StringsCompare}}, {{Code|StringsCompareCaseless}} and {{Code|StringLength}}. | ||
* The {{Code|Worldspawn}} entity has been renamed to {{Code|World}} and will now be used as a full-fledged entity. | |||
<!-- * Fixed {{Code|showinfo}} command. --> | <!-- * Fixed {{Code|showinfo}} command. --> |
Revision as of 01:02, 14 October 2023
SR SourceRenewed (working title) is a project based on the Source 2013 Singleplayer. Adds some new and useful things to the engine and improves the existing ones. However, unlike
Mapbase, this project is not meant to be fully backward compatible with any Source branch. Made by Max_34.
Changes in the common class of all entities
Parameters | Type | Description | Notes |
---|---|---|---|
Entity State | choice | Disabled or Enabled (by default). Whether the entity is enabled or disabled when spawning. | |
Inputs | Type | Description | Notes |
Enable | void | Enables an entity. | This entity state system is something new and has nothing to do with the deprecated "Start Disabled". For now, this only works with entities that have been reworked. [Todo] ☐ Figure out if this “Read-only” is worth it, or is it better to disable any I/O interaction when the entity is disabled. |
Toggle | void | Toggles the state of an entity between enabled and disabled. | |
Disable | void | Disables an entity. When an entity is disabled, it becomes “Read-only”. | |
SetGroup |
integer | Sets the group for the entity. By default, all entities are in group 0. | |
FireCustom1 |
void | Fires the OnCustom1 event if the entity is enabled. | |
FireCustom2 |
void | Fires the OnCustom2 event if the entity is enabled. | |
FireCustom3 |
void | Fires the OnCustom3 event if the entity is enabled. | |
FireCustom4 |
void | Fires the OnCustom4 event if the entity is enabled. | |
Outputs | Type | Description | Notes |
OnSpawn | void | Fired when the entity spawns. | [Todo] ☐ Make sure this event happens at the right time. |
OnKilled | void | Fired when the entity has been deleted. | |
OnCustom1 |
void | Fires in response to FireCustom1 input. | |
OnCustom2 |
void | Fires in response to FireCustom2 input. | |
OnCustom3 |
void | Fires in response to FireCustom3 input. | |
OnCustom4 |
void | Fires in response to FireCustom4 input. |
Env Entities
env_sound
Old name: ambient_generic

Todo: More documentation.
env_spark
Todo: More documentation.
Filter Entities

filter_class
Old name: filter_activator_class
filter_group
Old name: filter_activator_team
filter_name
Old name: filter_activator_name
Parameters | Type | Description | Notes |
---|---|---|---|
Filter | string | . | |
Filtering Type | choice | . | |
Inputs | Type | Description | Notes |
GetFilter | void | . | “Read-only” event. |
SetFilter | string | . | |
FilterActivator | void | . | |
FilterCaller | void | . | |
Outputs | Type | Description | Notes |
OnGetFilter | string | . | “Read-only” event. |
OnFail | void | . | |
OnPass | void | . |
Logic Entities

logic_auto

logic_autosave
Todo: More documentation.
logic_branch
Parameters | Type | Description | Notes |
---|---|---|---|
Initial value | float | Initial branch value. All negative numbers are false; all positive true; 0 depending on setting Treat 0 as. | |
Treat 0 as | choice | false (by default), indeterminate (for ternary mode) or true. | |
Inputs | Type | Description | Notes |
GetValue | void | . | “Read-only” event. |
Test | void | . | |
SetValue | void | . | |
SetValueTest | void | . | |
ToggleValue |
void | . | |
ToggleValueTest |
void | . | |
Outputs | Type | Description | Notes |
OnGetValue | float | . | “Read-only” event. |
OnFalse | void | . | |
OnIndeterminate | void | . | |
OnTrue | void | . |
logic_branch_manager
Old name: logic_branch_listener.

Todo: More documentation.
logic_case
Todo: More documentation.
logic_compare
Parameters | Type | Description | Notes |
---|---|---|---|
First value |
string | Initial first value. | |
Second value |
string | The value to compare against. | |
Inputs | Type | Description | Notes |
GetFirstValue | void | . | “Read-only” event. |
GetSecondValue | void | . | “Read-only” event. |
SetFirstValue |
string | . | |
SetSecondValue |
string | . | |
CompareInt | void | . | |
CompareFloat |
void | . | |
CompareString | void | . | |
Outputs | Type | Description | Notes |
OnGetFirstValue | string | . | “Read-only” event. |
OnGetSecondValue | string | . | “Read-only” event. |
OnEqual | void | . | |
OnNotEqual | void | . | |
OnLess | void | . | |
OnGreater | void | . | |
OnLessOrEqual | void | . | |
OnGreaterOrEqual | void | . |
logic_console
New entity.
Todo: More documentation.
logic_relay
Inputs | Type | Description | Notes |
---|---|---|---|
Trigger1 |
void | Fires the OnTrigger1 event. | |
Trigger2 | void | Fires the OnTrigger2 event. | |
Trigger3 | void | Fires the OnTrigger3 event. | |
Trigger4 | void | Fires the OnTrigger4 event. | |
Outputs | Type | Description | Notes |
OnTrigger1 |
void | Fires in response to Trigger1 input. | |
OnTrigger2 | void | Fires in response to Trigger2 input. | |
OnTrigger3 | void | Fires in response to Trigger3 input. | |
OnTrigger4 | void | Fires in response to Trigger3 input. |
logic_string
New entity.
Todo: More documentation.
logic_timer
Todo: More documentation.
Math Entities
math_calculator
New entity.
Inputs | Type | Description | Notes |
---|---|---|---|
GetValue | void | Get calculator value. Fires the OnGetValue event. | “Read-only” event. |
GetParity | void | Get the parity of a calculator value. Fires OnValueEven if the number is even and OnValueOdd if it is odd. If the value is a float, the non-integer part of the value will be ignored. | “Read-only” event. |
RoundValue | integer or void | Rounds calculator value: 0.3 = 0, 0.8 = 1. You can also specify a number that will determine at what level to round the number. For example, if the calculator number is 256 and the input value is 2 (comparable to the number of zeros), then the number will be rounded up to 300. This also works with negative numbers: if your number is 0.18, and the input value is -1, then the result will be 0.2. | |
SetValue | string, float or void | Sets the value of the calculator. | |
Add | string, float or void | Adds the entered value to the calculator. | |
Subtract | string, float or void | Subtracts the entered value from the calculator value. | |
Multiply | string, float or void | Multiplies the calculator value by the entered value. | |
Divide | string, float or void | Divides the calculator value by the entered value. Completely ignores the value 0. | |
Power | string, float or void | Raises the calculator value to the entered power. | |
Modulo | string, float or void | Calculates the remainder of dividing the entered number by the current calculator value. Completely ignores the value 0. | |
Outputs | Type | Description | Notes |
OnValueChanged | float | Fires when the calculator value has been changed. | |
OnValueNotChanged | float | Fires when the calculator value has not been changed. This only happens if one of the Inputs that interacts with the calculator value has been used. Therefore, the GetValue and GetParity events do not fire this Output. | |
OnGetValue | float | Fires in response to GetValue input. | “Read-only” event. |
OnValueEven | float | Fires in response to GetParity input if the value is even. | “Read-only” event. |
OnValueOdd | float | Fires in response to GetParity input if the value is odd. | “Read-only” event. |
math_color
New entity. Also combines the capabilities of math_colorblend.
Color constructor. Allows you to make color32 from separate integers. This color32 can be used as a whole or separately.
Todo: More documentation.
math_counter

Todo: More documentation.
math_remap
Todo: More documentation.
Deleted entities
- env_beverage
- filter_base
- filter_multi
- game_end
- game_player_equip
- game_player_team
- item_sodacan
- logic_active_autosave
- logic_lineto
- logic_multicompare
- math_colorblend
- multisource
- point_clientcommand
- point_servercommand
- trigger_once
Other
- Minor optimization to reduce entdata usage.
- Added more support for converting from one value format to another.
- New Hammer (in development).
- Trying to make engine code more readable.
- Replaced all
strcmp, stricmp, _stricmp, Q_strcmp, V_strcmp, Q_stricmp, V_stricmp, FStrEq, V_strlen, Q_strlen V_strlen, Q_strcasecmp, Q_strncasecmp, V_strncasecmp, V_strcasecmp
with more understandable and optimal
StringEmpty, StringsEqual, StringsEqualCaseless, StringsPartsEqual, StringsCompare, StringsCompareCaseless and StringLength.
- Replaced all
- The Worldspawn entity has been renamed to World and will now be used as a full-fledged entity.