Commit 3ab39b8
authored
Cancel data change (#4503)
* onElementDataChange can be cancelled.
onElementDataChange can now be cancelled when a client, setElementData, or removeElementData changes an element data.
This is useful because right now you have to do setElementData to cancel a change, which broadcasts to all players and also triggers the event again. Being able to just cancel the event is the cleanest way to deal with unauthorized data changes.1 parent 20d36cd commit 3ab39b8
File tree
4 files changed
+66
-26
lines changed- Server/mods/deathmatch/logic
4 files changed
+66
-26
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
709 | 709 | | |
710 | 710 | | |
711 | 711 | | |
712 | | - | |
| 712 | + | |
713 | 713 | | |
714 | 714 | | |
715 | 715 | | |
716 | 716 | | |
717 | 717 | | |
718 | 718 | | |
719 | | - | |
| 719 | + | |
720 | 720 | | |
721 | 721 | | |
722 | | - | |
| 722 | + | |
723 | 723 | | |
| 724 | + | |
724 | 725 | | |
725 | 726 | | |
726 | 727 | | |
727 | 728 | | |
| 729 | + | |
728 | 730 | | |
729 | 731 | | |
730 | 732 | | |
| |||
737 | 739 | | |
738 | 740 | | |
739 | 741 | | |
740 | | - | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
741 | 751 | | |
| 752 | + | |
742 | 753 | | |
743 | 754 | | |
744 | | - | |
| 755 | + | |
745 | 756 | | |
746 | 757 | | |
747 | 758 | | |
748 | 759 | | |
749 | 760 | | |
750 | | - | |
751 | | - | |
| 761 | + | |
| 762 | + | |
752 | 763 | | |
753 | 764 | | |
754 | 765 | | |
| |||
758 | 769 | | |
759 | 770 | | |
760 | 771 | | |
761 | | - | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
762 | 779 | | |
| 780 | + | |
763 | 781 | | |
764 | 782 | | |
765 | 783 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
148 | | - | |
| 148 | + | |
149 | 149 | | |
150 | | - | |
| 150 | + | |
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2738 | 2738 | | |
2739 | 2739 | | |
2740 | 2740 | | |
2741 | | - | |
| 2741 | + | |
2742 | 2742 | | |
2743 | | - | |
| 2743 | + | |
| 2744 | + | |
| 2745 | + | |
| 2746 | + | |
| 2747 | + | |
| 2748 | + | |
| 2749 | + | |
| 2750 | + | |
| 2751 | + | |
| 2752 | + | |
| 2753 | + | |
| 2754 | + | |
| 2755 | + | |
| 2756 | + | |
| 2757 | + | |
| 2758 | + | |
| 2759 | + | |
| 2760 | + | |
| 2761 | + | |
| 2762 | + | |
| 2763 | + | |
2744 | 2764 | | |
2745 | 2765 | | |
2746 | 2766 | | |
2747 | 2767 | | |
2748 | | - | |
2749 | | - | |
2750 | | - | |
2751 | | - | |
2752 | | - | |
2753 | | - | |
2754 | 2768 | | |
2755 | | - | |
2756 | | - | |
| 2769 | + | |
| 2770 | + | |
| 2771 | + | |
| 2772 | + | |
| 2773 | + | |
| 2774 | + | |
| 2775 | + | |
| 2776 | + | |
| 2777 | + | |
| 2778 | + | |
2757 | 2779 | | |
2758 | | - | |
2759 | | - | |
2760 | 2780 | | |
2761 | 2781 | | |
2762 | 2782 | | |
| |||
Lines changed: 6 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1017 | 1017 | | |
1018 | 1018 | | |
1019 | 1019 | | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
1020 | 1023 | | |
1021 | 1024 | | |
1022 | 1025 | | |
| |||
1037 | 1040 | | |
1038 | 1041 | | |
1039 | 1042 | | |
1040 | | - | |
1041 | | - | |
1042 | 1043 | | |
1043 | 1044 | | |
1044 | 1045 | | |
| |||
1053 | 1054 | | |
1054 | 1055 | | |
1055 | 1056 | | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
1056 | 1060 | | |
1057 | 1061 | | |
1058 | 1062 | | |
| |||
1064 | 1068 | | |
1065 | 1069 | | |
1066 | 1070 | | |
1067 | | - | |
1068 | | - | |
1069 | 1071 | | |
1070 | 1072 | | |
1071 | 1073 | | |
| |||
0 commit comments